0

How do I set gridview to have same rows and columns and size in any screen resolution?

I have tried to edit all the parameters in the xml file but it's no use. When I change the screen resolution I find the rows and columns messed and not in the order and form I made in the first place.

So for example if the last element in the gridview is 14 in screen resolution 2.7 I want it to be also the same element in 4.65 screen resolution.

Any ideas how can i adjust this?

mmBs
  • 8,421
  • 6
  • 38
  • 46
Outflorks Usus
  • 319
  • 1
  • 3
  • 5
  • Why do you want that? Its kind of counter to the idea of a gridview. The idea is that it shows as many items on screen as will fit, and allows scrolling to see the rest. If you really want to have a fixed number of elements on screen, you'll either need to shrink your items dynamically based on screen size (making them unreadably small on many devices), or need to have a tiny number of elements shown on large devices with lots of wasted space. – Gabe Sechan May 21 '13 at 18:10
  • And if you really have a fixed number of items you want to display in columns- you want a TableView, not a GridView. – Gabe Sechan May 21 '13 at 18:10
  • @GabeSechan i want to do this because i will be making this gridview transparent and setting a background image of a remote control then setonitemclick listener for it ...........and it would be much less code when making a table and setting an onclick listner on every table row or making these remote buttons separte. on the other hand when making a gridview.....i will only need an if condition that checks for the clicked position to perform a specific action. get it? – Outflorks Usus May 21 '13 at 20:09

0 Answers0