Closed wateret closed 5 years ago
Would it be worth it to add _parent member in View? With that member we may add these methods:
_parent
View
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
getRootView
cc: @sjsinju
Will revisit when we really need it.
Would it be worth it to add
_parent
member inView
? 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 classView
. https://developer.android.com/reference/android/view/Viewcc: @sjsinju