FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
01/27/15 09:06 AM (9 years ago)

menu button sizes

hi guys im trying to fix the button sizes in menu buttons, on the iphone and ipad they are good, when testing on s3,s5 and acer tablet, the buttons are differant sizes, https://www.dropbox.com/s/p0qf99ppsezwxlw/screens.jpg?dl=0 how do i increase the button size on android devices, i have followed couple of post on here, but noone seams to have sorted it. cheers sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/27/15 02:10 PM (9 years ago)
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
01/27/15 04:02 PM (9 years ago)
have you tried changes the sizes in the "public RelativeLayout getButton" method?
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
01/27/15 04:09 PM (9 years ago)
actually I used this before when creating a custom plugin(make sure you import Display,Point,and Math classes though,when you get errors): Display display = getActivity().getWindowManager().getDefaultDisplay(); Point screenSize = new Point(); display.getSize(screenSize); int size = Math.min(screenSize.x, screenSize.y); int buttonSize = Math.round(size * 0.24f); theButton.setMaxWidth(buttonSize); theButton.setMaxHeight(buttonSize); never tried it with that plugin though.After I finish my homework and update one of my plugins,I'll try if I get a chance tonight
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/28/15 01:47 AM (9 years ago)
@alan, yes alan , ive got that plugin and its great, but only for horizontal top or grid buttons, not for bottom horizontal, cheers dude. Thanks cm will check that option today, i need the buttons to be bigger, but also sometimes i might have 4 and sometimes 7, can you scroll along the buttons doing this or do you have to have a set amount to strech on the screen. cheers guys sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/28/15 02:01 AM (9 years ago)
Looking at your graphic, I am guessing that you need the buttons to a) always line up at the bottom b) have them in a centred, equally spaced grid c) size correctly The problem with Android is that there are so many different device screen sizes that it is hard to find a 'one size fits all'. In html, it is about setting everything as a percentage of the screen size in the css. I would not how to do that on java. I was thinking that the Menu Image Buttons plugin can do b) and c) and maybe with a bit of 'adjustment' that it might give you a) as well.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/28/15 02:09 AM (9 years ago)
yeah that would be cool if i can adapt the menu button plugin, as for menu buttons, it would be ok if i could just double the size on everything, so i dont need to worry about diff devices, just need them to be twice as big cheers sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/28/15 02:27 AM (9 years ago)
Maybe ask Susan Metoxen. If buttons could reliably line up at the bottom of a screen, that would be a nice enhancement, I think loads of people would use it.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/28/15 11:48 AM (9 years ago)
i did ask susan in another post about it, but i think if she could of done that, she would off, fixed it though guys, rookie mistake, forgot to add all the differant size icons in the other 5 folders, i have about 60 icons, x 5, used great little tool to batch compress png files, its free as well. http://pngquant.org/ cheers for your help guys sean
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
01/28/15 04:52 PM (9 years ago)
cool stuff. Yea I will still try when I get a chance.that code I posted above figures out the screen size and change the size dynamically so you just use your biggest image and dont have to add extra folders. thanks for the tool too!never heard of it,works great!
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/29/15 02:47 AM (9 years ago)
explain to me your method above dude, which file do i change, what code do i addapt cheers sean
 

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.