Silly layout question

Kevin

Well-Known Member
Licensed User
Longtime User
I've been working on another update to my app and am finally getting around to adding support for landscape. I use 7 layouts for EACH "screen" in my app, so as you can imagine, this is time consuming. I spent two days (around 10 hours per day) getting everything looking just right.

Today I decided it was time to also look into the Kindle Fire's specs since I also sell my app on Amazon. Naturally, the resolution isn't really close to anything else, so once again I am looking at creating a dozen more layouts.

But I got to thinking.... I think I am approaching this wrong in the first place. What I have been doing is increasing the button sizes on the higher resolution devices to fill the screen. I initially figured this was the best approach, but I remember a comment on my app not too long ago that their only complaint was that the buttons were a bit large on their tablet.

I think I need to do this differently now. Now I am thinking that I should just stick to basic resolutions (maybe increasing button sizes a little bit on higher ones) and simply centering everything on the screen. Part of the problem is that I do not own a tablet, so I don't really know what it SHOULD look like, having never seen other apps running on a tablet, or even my own app on an actual tablet.

What resolutions (variants) would you recommend, and just how much larger should I make the buttons? For example, I think that the button sizes for a 320x480 variant WOULD be too small on a 800x1280 screen. But I don't know that I should necessarily FILL that 800x1280 screen with huge buttons.

This seems like such basic stuff, and I can't believe that I don't even know how to do this now. :confused:
 

susu

Well-Known Member
Licensed User
Longtime User
My Samsung Galaxy Tab P1000 have 600 x 1024 screen. Note you can create any screen size for Android Virtual Device by using AVD Manager.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I understand your problem, has it is one of the most discussed ones in the forum...

I see three ways of aproaching this issue...
1st - In the visual/virtual designer add the aditional layouts and set your "layout" in each one... On app start, the most apropiate one will be automatically chosen and loaded...

2nd - use the standart layout variant and use dip values on your views layouts (in code), this will scale the views to the device density, thus resising the layout to the screen...although the results may not be the best...

3rd... and harder...is to try...(yes, try) to set the views in code acording to the device specs, using the screens width/height and the density...
With this aproach you can ensure a better suiting of your app to most layouts...

for example...
I now own a 320x480x1 "generic" phone, a 480x600x1,5 SGS phone and a 480x600x1 device...
So I am setting my views using the screens with/height, and using the density for the font sizing... and this aproach is the one giving me the best results so far...
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
When I started working on this recent update, my intention actually was to create my app's more complicated layouts in code. As it is, I already have several (simpler) screens that are done with code. One of the problems I face with my particular app is that the "button" height/width ratio and placement need to be pretty precise otherwise it will not look right. After thinking about how best to do it for an hour or so, I ended up just creating more variants in the designer. :BangHead:

But now that I am faced with creating even more, it is just beginning to seem like way too much work; and never ending as more devices come out.

I guess my biggest question is: At what resolution should I just decide it is all big enough and then just center that in bigger devices? My app is a remote control app (simulated "remote control" buttons). At some point, huge buttons on a 10" screen are probably pushing the level of ridiculous, and I suspect they are probably already way too big. I need to just decide on a max resolution and just center that on bigger screens. I just can't decide what is a good cut-off point.

But now that I am thinking about it again, this may not actually work because if there is some new size on a device, Android may pick the wrong one. Case in point, I had to recently create another layout for the new Galaxy Nexus because of all the layout variants in my app, it was choosing one that was slightly too large to fit the screen and I'm not sure why it would do that.
 
Upvote 0
Top