I would like to have a custom view in my application that consists of an ImageView and optionally an overlay TextView. How can I combine these to create a single view? I need a single view because I plan to use the view to populate a GridView or ListView with items. Is the best way to use compound controls and does this work well with adapters and GridView?
Share
You just create it like any other layout and then use that layout in your adapter for the gridview.
Java Code:
customgrid.xml:
And here it is in action: