I currently have an app with a gridlayout of 6 ingredients. Each ingredient is a linearlayout with an image, name, and two buttons. Now the tough part has been that everything needs to be dynamically and programmatically generated, as these ingredients changes (strawberry, apple, orange, etc).
Now I was looking into changing the gridLayout to gridView with an adapter so I could leave room for future expansions as I get more ingredients. Most examples of gridview include an image and text. Now is it possible to have two buttons that I could programmatically set their id inside the gridview? If anyone could point me to the right direction or a more sophesticated gridview example that would be much appreciated.
Update: recycleview did the trick for me. Thanks for the answers.