Answer the question
In order to leave comments, you need to log in
Additional data for an element?
Hello!
Suppose there are several buttons generated by Button on the page, when clicked, AlertDialog opens.
And the question is, is it possible to add additional parameters to the generated button so that I can get them and understand from which button the dialog was opened?
For example, from the life of html tags, they have data attributes:
Is this possible in android?
Thank you!
<button data-url="..." data-id="...">Save</button>
Answer the question
In order to leave comments, you need to log in
All elements have a tag attribute - you can stuff anything into it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question