androniennn
androniennn

Reputation: 3137

Screen not scaling the GridView

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

Answers (1)

Balaji.K
Balaji.K

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

Related Questions