I have 4 bitmaps that I want to store values for each uniquely. The values would be coming from an external source and i want to map these values to each bitmap specifically. So bitmap1 should be associated with 1, bitmap2 with 2 etc. So if i should click on any of these bitmaps a toast message would pop up with the number associated to that bitmap. Currently i have the bitmaps stored in an array then pulled and displayed on a surfaceview. I want to know the best way or if there is someway to associate the bitmaps to integer values uniquely, even after removing 2 or 3 of the bitmaps the remaining bitmaps still hold there integer values. Any tips or suggestions on this process ? thank you
Share
Keep your bitmap in a
HashMap<Integer,Bitmap>this way you can identify your Bitmaps uniquely and maintain the hierarchy and positions.