0

this is my first question ever on stackoverflow, so please go easy on me, but I'm having troubles grasping some idea on the gridlayout.

image (Sorry I don't know how to post inline images...)

The image above is the result I want to get (ignoring the mail button, I just haven't removed that from the default layout yet). The reason why I chose gridlayout is because I wanted to make sure that, no matter the device, oak would always be sitting just above the red bar which is part of the background image. I noticed that in order to make sure the cells have equal height and width, I need to put weights on them, but my column and row count is over 100, so I don't want to have to make over 1000 spaces! Even if I were to, I don't exactly know what weight to set each of them honestly... Is there a way to achieve my desired result?

Garfield Tong
  • 408
  • 4
  • 12
  • Please consider this you will not have to make thousand-lines xml layouts and will avoid future problems http://stackoverflow.com/questions/29956014/why-should-we-use-xml-layouts – Nanoc Nov 04 '15 at 16:29
  • I'm sorry, I'm afraid I don't understand... You want me to put dip dimensions on each cell? – Garfield Tong Nov 04 '15 at 16:35
  • 1
    Check [this](http://developer.android.com/guide/topics/ui/declaring-layout.html) page in Android Developers Docs and maybe re-think your layout... what you describe seams more like a Relative Layout than a Grid Layout... – Mikel Nov 04 '15 at 16:38
  • Im telling you to consider creating the interface by code getting the screen dimensions so you can set the exact pixel sizes and using for loops for creating repeating content. – Nanoc Nov 04 '15 at 16:43
  • @Mikel Ok... but the layout I have, the background contains the red bar you see on the bottom, so if this application was cast onto a larger screen, then the red bar would be larger. I just want to make sure Oak is always above the red bar, but it doesn't have an ID because it's part of the background image. – Garfield Tong Nov 05 '15 at 03:47

0 Answers0