bizappsmedia
buzztouch Evangelist
Profile
Posts: 39
Reg: Nov 21, 2012
San Diego,CA
6,590
01/02/13 01:58 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
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/02/13 08:46 PM (13 years ago)
Without enough experience to speak authoritatively, all I can suggest is try creating graphics for each layout size. http://coding.smashingmagazine.com/2011/06/30/designing-for-android/ http://developer.android.com/guide/practices/screens_support.html https://developer.vodafone.com/image-and-graphics-tips-android/ Good luck! Cheers! -- Smug
 
CRTaylor
Aspiring developer
Profile
Posts: 71
Reg: Mar 16, 2012
Perth, Western ...
10,310
like
01/05/13 08:41 AM (13 years ago)
A quick suggestion to try, add (if you don't already have it): android:gravity="center" to the parent layout of those buttons and see if it solves your problem Cheers Carlos
 
eJucomm
Aspiring developer
Profile
Posts: 73
Reg: Nov 22, 2010
McAllen
730
like
01/06/13 05:50 PM (13 years ago)
Thanks Smug for the resources. I checked out the first article and it reads that we should be creating 3 different image sizes with three different resolutions. In Eclipse, under bin>res there are three additional drawable folders for the main icon and I am wondering if we should do the same for the buttons in our app? Hmmm. Carlos, I tried turning gravity=center and nothing. Anybody have any advice?
 

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.