Android Question Find Instance

fishwolf

Well-Known Member
Licensed User
Longtime User
If i draw the graphics interface to runtime, for example a button

and define the instance of button into a function or method.

can i find the instance of button into activity into other function or method?

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
You must be much more precise with your description of your problem.
Put the button reference into a map for example after you created it...
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
Another option is to use the Tag to store a string or integer value to identify the view by. You can itterate through all the views to find the one you want or use Sender to take a reference to a view that has been clicked for example.
 
Upvote 0
Top