Reputation: 3137
I'm building an app that it's first activity is a GridView. I have a problem that i alaways want to display just 2 images per row in all screen sizes, densities...
The display in the emulator is excellent, but not when installing it in my SGS, please look at the 2 images:
http://imageshack.us/g/847/screenshot1pf.png/
Can you please help me to find a solution for that problem?
I just want to display 2 elements per row.
Upvotes: 3
Views: 327
Reputation: 4839
you need to set the number of column values to two.
gridview.setNumColumns(2);
ohterwise in layout xml file declare an attribute for gridview like this
android:numColumns="2"
Upvotes: 4