0 votes
by (2 points)
edited

Hello Working on Android studio. How to register commands to buttons dynamically created user? For example, I have a layout with a list of rooms and the top one & quot; Add new room & quot ;. I need to get after it created a new key to pass to the newly created layoutAliya Skendirova

3 Answers

0 votes
by (2 points)
edited
Not sure you have well understood. Perhaps you no longer have approached list? Then it would be enough to write a single adapter that would work the same way for each list item.
0 votes
by (4 points)
edited
If a new button item in the list is meant, then yes, you need an adapter. RecyclerView can be used as a View to the list. If the issue is specific to the upgrade screen, it is a challenge notifyDatasetChanged adapter notifyItemInserted method or if you know the position of the insertion element. If the question is to how to tie some action to a button, for example pressing process, this is done by simply adding onClickListener & # 39; a, but there recyclerView own specialized method to add a button press listener processing. The second answer: https://stackoverflow.com/questions/24471109/recycler ..
0 votes
by (2 points)
edited
Welcome to askiry.com, where you can ask questions and receive answers from other members of the community.
...