Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 33    Views: 50

FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
06/25/14 12:55 AM (10 years ago)

android screen sizes

for some reason my app is using large settings for a small device, ie sony experia live device, so all the fonts are 2 large and overlapping, i cant change the font sizes on here 2 much, as it effects the ios ipad version, anybidy any idea how to fix this in eclipse . cheers sean
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/25/14 01:39 AM (10 years ago)
Well, the sizes for 'large' and 'small' are related to resolution, not physical size... and these days, most devices are medium to high density (better resolution) therefore they are being considered a 'large' device, because the resolution falls within the preset 'window' of eligibility. If you want to 'change' that, you'll want to play with the numbers. Look in 'BT_device.java' around line 106 or so... Cheers! -- Smug
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 01:43 AM (10 years ago)
cheers smug , will check it now. thanks sean
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 02:32 AM (10 years ago)
do you mean here smug, tried changing the value, it was on 600, so changed to 800, no diff, then 200 no diff, am i on the right track dude, //large or small device? if(this.deviceWidth > 200){ this.isLargeDevice = true; }else{ this.isLargeDevice = false; } //set screen density... DisplayMetrics metrics = new DisplayMetrics(); display.getMetrics(metrics); this.deviceScreenDensity = metrics.densityDpi; BT_debugger.showIt(objectName + ": This device uses an Android display
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 04:58 AM (10 years ago)
still cant figure this out, when i use a real device, it wont refresh as it crashes, so any changes i make in control panel will only show when i redownloud the project (36 and counting lol) when i use the simulator, it will refresh, but isn't showing any changes, the app works great, except for it using tablet text/row settings on a handset.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/25/14 05:04 AM (10 years ago)
I guess it would depend on the device and simulator... There is a bt_debugger statement that 'should' tell you what the recognized screen size of the device is... from there you should be able to 'tune' it a bit to better fit your 'intended' devices. But all it's going to do is determine whether the device is a 'large' device (ie, a tablet) or a small device (a phone). You'll still need to make changes in affected screens with respect to Font Size, color, etc... similar to those spots mentioned to you in a different post. And the 'drastic' method would be to alter the plugin XML file, which in some cases is needed... in most it's not. Cheers! -- Smug
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 06:21 AM (10 years ago)
do you mean here smug, as i tried that yesterday, didnt work, and someone pointed out that it would reset itself when it refreshed from config file . //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listRowHeightLargeDevice", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listTitleFontSizeLargeDevice", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listDescriptionFontSizeLargeDevice", "18")); }else{ //small devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listRowHeightSmallDevice", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listTitleFontSizeSmallDevice", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listDescriptionFontSizeSmallDevice", "18")); }
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 06:31 AM (10 years ago)
tried it again, still no change, am i right in change values, clean, restart in simulator, cos nothing im doing is having any effect
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 06:32 AM (10 years ago)
changed it to this and nothing happens, //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listRowHeightLargeDevice", "150")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listTitleFontSizeLargeDevice", "55")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listDescriptionFontSizeLargeDevice", "30")); }else{ //small devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listRowHeightSmallDevice", "60")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listTitleFontSizeSmallDevice", "25")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listDescriptionFontSizeSmallDevice", "15"));
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 06:56 AM (10 years ago)
This is mental, nothing in eclipse is changing the values, prob because im doing something wrong, well not probably, is because im doing something wrong, where in eclipse can you add diff screen sizes for diff phones dude
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 06:58 AM (10 years ago)
Sean. It is the "listRowHeightLargeDevice" you have to change to override the BT config. Try this e.g. listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "150", "45")); Where 150 is presumably the mad number you are using to test if it has an effect.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 07:11 AM (10 years ago)
right im in on create for screen menu, im putting it in like this is that correct krompa, //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "150", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listTitleFontSizeLargeDevice", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listDescriptionFontSizeLargeDevice", "18"));
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 07:47 AM (10 years ago)
Yes, but if you do that you will only alter the value of listRowHeight for large devices. If you want to do the same for listTitleFontSize and listDescriptionFontSize you need to alter the corresponding figures in those statements. And repeat for small devices. e.g. //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "l50", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "55", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "30", "18")); }else{ //small devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "60", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "25", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "15", "18")); } I am using the values here that you stated you wanted to use above, presumably testing for if you are having an effect and overriding the config file. Remember to use a copy of your original code and comment out the original code using // at the start of each line so you have the original code there if something goes wrong.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 07:53 AM (10 years ago)
Can you post what your values are for the following in the BT config file / control panel? listRowHeightLargeDevice = listTitleFontSizeLargeDevice = listDescriptionFontSizeLargeDevice = Is the row height ok? If so, leave it alone. Is it just the title font size and description font size that is too big?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 09:53 AM (10 years ago)
thanks for your help kompa, what im doing as you said above is changinging in both to see if theres any differance and im not seeing any, buzz control settings are small large row height 60 row height 130 title height 30 title height 65 title font size 25 title font size 55 descrip font size 25 desrip font size 35 which gives me these screens on iphone and ipad https://www.dropbox.com/s/98sivgfd42i614x/apple.png and same settings in android give me these https://www.dropbox.com/s/cil2t3e0g2apf90/android.png Ive been at this since last Friday, and nothing i do in eclipse changes these setting, i did try changing all those setting above, unless im doing something rely stupid, which is normally the case lol , its my first paid job as a developer since joining buzz over year ago, so im panicking a bit lol, any pointers would be much appreciated, i know Ive had loads of pointers so far, and Ive followed them to a t, but im obviously doing something wrong, i do make nice icons if you want a set lol cheers sean
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 10:19 AM (10 years ago)
right ive redownled and followed both smug and kompas advice, which worked hurray :)whats weird is all i basically did, was input the values from buzz control into eclipse wb_screen_menuimage.jave, you would of thought the plugin did that, or at least explain that you have to add the values, thanks guys, sorry for being a noob, still dont know why its putting black box around icons though, any idea https://www.dropbox.com/s/y7ni8oxyhfjls3y/Untitled-1.png ita only doing it on those screens though, as you can see above on the front screen (same icons) theres no black border
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 10:22 AM (10 years ago)
Try this and see if there is a notable difference. //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "70", "70")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "28", "28")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "20", "20")); }else{ //small devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listRowHeightSmallDevice", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listTitleFontSizeSmallDevice", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "listDescriptionFontSizeSmallDevice", "18")); }
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 10:24 AM (10 years ago)
I posted the above before I saw that you said it had worked.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 10:26 AM (10 years ago)
oh and it still crashes when you refresh on real device not on the sim,
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 10:37 AM (10 years ago)
thanks kompa, couldnt do this without you guys pointing out where im going wrong cheers sean
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 10:41 AM (10 years ago)
So you are able to control the row and font size in Eclipse, overriding the config file? When you have found the optimum row/fontsizes, could you re-post that section of code as it may be useful for others in the same situation? Glad to help. I'm unsure on your other queries though.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 11:00 AM (10 years ago)
of coarse dude, here the setting i used and it works great, //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "l30", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "55", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "35", "18")); }else{ //small devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "60", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "25", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "15", "18")); } thanks again sean
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 12:18 PM (10 years ago)
ive got the app looking good on live phone device, but when i view on tablet in a simulator, its showing small settings, is there somewhere i can list device sizes or something
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 12:25 PM (10 years ago)
Ok Sean, final post on this I promise. I was unsure why things hadn't worked out the first time you changed the code so I did a bit of testing on my machine. You have a working solution which is great, but you should understand that the data being used by your app is the 45, 22 and 18 (and not the 130, 55 and 35). So for completeness, and to help you with any further changes, you should change your code as follows: //large devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "", "18")); }else{ //small devices... listRowHeight = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "", "45")); listTitleFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "", "22")); listDescriptionFontSize = Integer.parseInt(BT_strings.getStyleValueForScreen(this.screenData, "", "18")); } It is essential that after you make code changes that you: save the file clean the project run the app for testing Does that make sense? You can alter the 45, 22 and 18 at your will knowing that this will make a difference to your app. BTW, am I right in thinking that you have only tested this new code on large devices? If this is true then you should also test on a small device, as you have changed the source code for small devices without testing it.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 12:32 PM (10 years ago)
no im primarily testing on live phone device,which looks great now i changed the above values, but wont changing it back to above, take me back to where i was before
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 12:43 PM (10 years ago)
What I provided in my last post is actually where you are now, it isn't taking you back. Trust me, your app is using the 45, 22 and 18 values. By using the "" in the middle section of the brackets you are overriding the config file. Your app isn't making use of the 130, 55 and 35 values. I have tested it in one of my apps. Regarding your point on the tablet, I have spent hours banging my head against a brick wall with that one. Android supposedly scales everything up great but I've yet to see it work perfectly.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 12:44 PM (10 years ago)
I'll have to crack on with some other things now. So best of luck to you Sean. It will be worth it in the end mate.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 12:44 PM (10 years ago)
changed it as you said dude, the live device settings stayed the same, working great, but as soon as i tested on large device sim, setting got all small like this https://www.dropbox.com/s/cz8gcdg97cza7ra/homepage.png
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 12:45 PM (10 years ago)
ok krompa thanks for your help dude
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/25/14 12:50 PM (10 years ago)
At the mo, your small and large device settings are the same (45,22,18). So increase those 45,22,18 values for the large device and see what happens. It is hard for me to tell from a distance if your live device falls into the large or small device category. So i'm unsure if you altering the large device settings will adversely affect your live device app. Tinker and see. Good luck.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/25/14 01:09 PM (10 years ago)
thanks dude, will carry on tinkering
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/26/14 10:06 AM (10 years ago)
Kompa, i took you advice and it sorted all the screen problems on a android phone, ive been trying all day to play with the screen settings on large device, what im getting before adjusting is this https://www.dropbox.com/s/q1o2p9rpy5011pv/device-2014-06-26-175249.png what i need to do is increase the row size, when i change the title size and description size, it changes on the device, but when i change the row size, nothing happens, but when i increase the title font it increases the row size, but tangles both title and description fonts together, do you know why the row isnt increasing when im changing it, sorry for bothering you dude, i know your busy with your own stuff, cheers sean
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
06/26/14 12:14 PM (10 years ago)
I'm unsure on this one. Make sure you are cleaning your project after saving. One possible way around it may be to increase the text padding of the text in the corresponding .xml file in the res/drawable folder. However this will change the padding on all devices - so be warned. Your screenshot looks fine though. I don't own this plugin so its hard for me to advise.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/26/14 01:40 PM (10 years ago)
yeah i always save clean and restart the app, i need to keep the settings for small device as there perfect, its supposed to look like this on large device https://www.dropbox.com/s/98sivgfd42i614x/apple.png its using the large device settings, but not the row size, and i find it strange that the other 2 settings work bar the row size, i will email the plugin developer see if they have any pointers, im prepared for little bit of difference between devices on android,thanks for your help kompa 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.