Reputation: 13
i am developing one simple application for android mobile here i am using two grid view i want to display one grid view in page load and other one is on click of first grid view row clcik how to do that please help or give me code sample or link to refer
thanks in advance
Upvotes: 1
Views: 1355
Reputation: 6083
if you want to launch a gridview on click of other's row. You can use the second gridview in an activity with dialog theme. This will thus be showed as a popup to the first gridView's onclick. You can set different such activities for each of the row of first gridview.
Upvotes: 0
Reputation: 4185
I think the easiest way to do this would be to create your layout with both views on and set the second one to invisible. Then in your activity you can set an onClick listener to the first GridView with something like:
GridView g = findViewById(R.id.second_grid_view);
g.setVisibility(VISIBLE);
Upvotes: 2
Reputation: 6083
The grid view example is there in the API Demos. You can find it on Android Grid View
The necessary files are present in the API Demos present in your android setup.
Upvotes: 0