Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 117

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
04/18/12 12:53 PM (13 years ago)

Possible to customize button menus for several different android screens?

I have an app which a button home screen (3 rows of 3 buttons). I can get this to look great on iPhone and iPad since there is only one small and one large screen to develop for. THis is obviously not the case with Android and despite my best attempts nothing seems to work for all of the more common screen sizes. Sooo... I was wondering if anyone has had luck customizing the code to do something like the following: if screen resolution is A (kindle fire), then button size and spacing is %^$% if screen resolution is B (samsung galaxy), then button size and spacing is U*&&^* if not, then use small and large device settings. any ideas? as you can tell I'm not much of a programmer but have been able to do some cool things so far but need some direction. Thanks! Josh
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/18/12 01:13 PM (13 years ago)
Are you using the same Buzztouch app for both iOS and Android ? Fred
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
04/18/12 01:17 PM (13 years ago)
Yes, I am using the same app for iOS and Android but have different home screens set up. And yes, I tried using image name large device. The problem is there are a couple large devices and MANY different smaller devices that are available. Having settings for just one generic small device doesn't quite cut it. I'd like to keep my button image home screen but if I can't figure this out I'll have to go to a boring list menu like most other people or just accept the fact that the buttons won't be configured right on many of the android phones in use.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/18/12 01:27 PM (13 years ago)
The Buzztouch Source Code does not provide a medium density or extra large density folder. If you add the folders, then took as look at the layout file it might be possible. Fred
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/18/12 01:36 PM (13 years ago)
Around line 162 of the BT_screen_menuButtons.java file you could add and else if for medium density devices and adjust the values for all thee densities. Might work. FRED
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
04/18/12 01:47 PM (13 years ago)
Thanks! I never even heard of screen densities before since I'm so used to iOS. I googled it and found this on the Android developer site: http://developer.android.com/guide/practices/screens_support.html should work. Thanks again
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/18/12 01:58 PM (13 years ago)
Yes, just make different layout folders ex. "layout-large" adjust your xml screens for each device...google will give more info...messing with layouts is awesome for Android
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/18/12 02:08 PM (13 years ago)
You should take a look at Source Code (Android) the latest addition to my guide . www.MySkylla.com Fred
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
04/18/12 03:58 PM (13 years ago)
If you're not familiar with else if First the large density, then } else if () { then, small density. Fred
 

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.