Android Question How to Get CustomView Instance from Sender?

Mashiane

Expert
Licensed User
Longtime User
Hi there

How can I return a custom view instance, as an example, in the CustomListView example I want to get the customlistview instance and assign it to some variable of same type.

1. Let's assume you have 3 customlistviews in your layout.
2. In each customlistview you load different layouts, lets assume one has a button that you can click
3. How do you, from the clicked button get the customlistview instance that houses the button?

Currently from the customlistview you can can an index from the sender view, then the panel using that index, how can you get the instance of the listview and assign it to a variable of similar type?

Thanks
 
Top