How do you get a layout that contains an element in the Android?
-
The Android question is, there's a button, and we need to get a layout where it is. How do you do that? Note: Id is not possible because the buttons are added through inflate and should be obtained in the Click method.
-
For any parent
View
He has a method.getParent()
♪ The result they return must be downloaded.ViewParent
to an heirViewGroup
:ViewGroup parent = (ViewGroup) someView.getParent();