wateret/mengde

Examine introducing "parent" member for View

wateret opened this issue · 1 comments

Would it be worth it to add _parent member in View? With that member we may add these methods:

  • View* parent() { return _parent; }
  • View* root() { follow the parent chain until getting nullptr; return root; }

I'm not sure if it is worth it to have this.

From Android, it has getRootView method in class View. https://developer.android.com/reference/android/view/View

cc: @sjsinju

Will revisit when we really need it.