Search code examples
androidimageviewandroid-imageview

Android Help - Dynamic ImageViews?


so I'm looking for a solution where I can add new imageviews, and when I remove one, the rest adjust. I've included a poorly drawn example of what I mean - when we remove the "man" imageview, everything else shifts to the left. I'm pretty new to Android development so I'm not sure if this is possible/what type of layout I would need/which terms to search. Any help would be appreciated!

before removal: https://i.sstatic.net/bTbrM.png

after removal: https://i.sstatic.net/LBJrH.png


Solution

  • Simply just use the GridView for this. Update the records when you take the action for deleting the item from the GridView, and make it notified your GridView can automatically make it for you.