bizappsmedia
buzztouch Evangelist
Profile
Posts: 39
Reg: Nov 21, 2012
San Diego,CA
6,590
01/02/13 12:07 PM (13 years ago)

Menu buttons on different android screens

Hello buzztouchers! I'm having some trouble centering the button images on the "large" screen (480x800), while the "normal" screen looks fine (320x480). Here are the screen shots to compare: https://www.dropbox.com/s/7viigoexo2yk195/FIOpenHomeScreen480.png https://www.dropbox.com/s/hzvdbpa6eikp58y/FIOpenHomeScreen320.png I tried creating a different res > layouy-hdpi folder with the appropriate xml files for the menu buttons and tried messing around with padding sizes, and margins. Nothing I tried seemed to help. I'm hoping some of the tried and true android experts can help steer me in the right direction. I appreciate any help!! Eric
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/02/13 01:44 PM (13 years ago)
Hey Eric, Did you play around with the landscape mode to help on the larger devices? LA
 
bizappsmedia
buzztouch Evangelist
Profile
Posts: 39
Reg: Nov 21, 2012
San Diego,CA
6,590
like
01/02/13 01:59 PM (13 years ago)
Hi LA, Thanks for the response. I didn't try landscape. I just turned my device to landscape and I'm seeing the same behavior where the icons are moved over to the left side of the screen. Any tricks you can point me to?
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/02/13 02:03 PM (13 years ago)
Did you try this on a real device and not the emulator? Sometimes the emulator can play tricks on you. LA
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/02/13 02:07 PM (13 years ago)
If not try this: android:scaleType="centered" LA
 
bizappsmedia
buzztouch Evangelist
Profile
Posts: 39
Reg: Nov 21, 2012
San Diego,CA
6,590
like
01/02/13 09:55 PM (13 years ago)
Thanks LA. I'll give this a try and let you know. I tried the landscape on a real device and when it went to landscape the icons moved to the left of the screen.
 
bizappsmedia
buzztouch Evangelist
Profile
Posts: 39
Reg: Nov 21, 2012
San Diego,CA
6,590
like
01/03/13 01:45 PM (13 years ago)
I did try android:stretchColumns="0,1" based on the following: http://stackoverflow.com/questions/1666685/android-stretch-columns-evenly-in-a-tablelayout This did even out the columns in the grid button menu no matter the screen size, however the text labels didn't seem to follow. I think more with massaging it can work.
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/03/13 01:49 PM (13 years ago)
Great! Glad that worked. Yeah play around with it and you will get it to work. LA
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.