I want to display a bunch (number determined at run time) of closed boxes (same png file displayed multiple times) on the screen in columns.
When the users clicks on one of the boxes, the image will switch from a closed box to an open box (another png file) and some info will be displayed.
I can't specify the boxes via an xml file, because the number of them I'm displayed is determined at run time. I'm having a hard time figuring out what Android objects to use. I'm using a LinearLayout (orientation=vertical) containing 2 ImageViews and want to put all my boxes in the top ImageView.
Would I create the box images as Drawables? How do I position them on the ImageView in columns without hardcoding the space between them? Is it possible to hook an onClickLIstener to a Drawable?
I'm pretty sure I could figure out how to do this with TextBoxes, but I think the box icons would make for a more visually appealing app.