I have a GridView with 4 columns, when one is selected, I wanted to dynamically add a whole row underneath the selected cell, and inflate a layout in it, so that I could add some information about the selected cell. Is there anyway to do that? Or maybe, is there a way to split a view in half, then glue it back together when done? Sounds crazy.
Essentially, I'm looking for something you can find on iTunes 11 (see the picture below).
Yeah. You can do that. the xml file where you defined grid view, below that define one linear layout too and make it invisible by adding following code:
On click the GridView, inflate that layout and set its visibility and use following java codes:
for set visibility true/false by java code:
The Solution to your question is to simple use TabHost widget:
The XML file to that is as below:
And The java code for that is as below:
Hope this works fine for you.. And hope this is what you asked for.