Android Screen-Resolutions?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Android Screen-Resolutions?

Post by DevBoyLars » Wed May 01, 2013 3:59 pm

Hi there,
is there a list for the most recent screen-resulotions on Android, which my App should supports?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Android Screen-Resolutions?

Post by jacque » Thu May 02, 2013 7:06 pm

Go to Wikipedia and search for "Android screen resolutions". There's a huge gigantic table there. You'll see that the dimensions are all over the map, it is almost impossible to target any particular one. It's better to calculate a width/height ratio and use that to resize and position all the controls. There are glitches with that method too though -- for example, you don't want to resize a button so that on small screens it becomes too tiny to hit.

If it helps, one of the Kickstarter goals is to make all this easier. I can't wait.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: Android Screen-Resolutions?

Post by DevBoyLars » Thu May 02, 2013 9:28 pm

Yes, I can't wait to. It's horrible right now -.-

How do you handle it, if there are screen-resolutions, which are not proportional like the difference between iPhone 4 and iPhone 5?

If I would resize everything proportional, it would means, that there is free space on an iPhone 5 on the top or bottom.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Android Screen-Resolutions?

Post by jacque » Fri May 03, 2013 6:36 pm

A proportional resize won't break between the different iPhones, just as it won't break on all those Android sizes. Part of the resizing is determining where objects are located, which you do using percentages. For example, to place an object near the top of the screen, determine what percentage of the screen the top should be at. Maybe it's 10% down from the top. Then after resizing the rectangle, you place the object at 10% of the screen height and it fits. There are two dimensions to resizing -- the rectangles of the objects themselves, and their placement on the screen.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: Android Screen-Resolutions?

Post by DevBoyLars » Sun May 05, 2013 11:46 am

Oh ok, thanks for this information. It will helps me much I think :)

I'm still working to find the right way for me to build mobile Apps for iOS and Android in one App.

mobGUI is a great start for me, but there a much limits. So I'll try the manually resizing way :D

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: Android Screen-Resolutions?

Post by DevBoyLars » Wed May 08, 2013 10:17 am

jacque wrote:A proportional resize won't break between the different iPhones, just as it won't break on all those Android sizes. Part of the resizing is determining where objects are located, which you do using percentages. For example, to place an object near the top of the screen, determine what percentage of the screen the top should be at. Maybe it's 10% down from the top. Then after resizing the rectangle, you place the object at 10% of the screen height and it fits. There are two dimensions to resizing -- the rectangles of the objects themselves, and their placement on the screen.
How can I set an object to for example 10% of the screen height? Can I enter the % anywhere?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Android Screen-Resolutions?

Post by jacque » Wed May 08, 2013 7:00 pm

Code: Select all

set the height of <obj reference> to the height of this cd * 0.1
Then you will probably want to set the top of the object as well. Use the same calculation to find a percentage of the card height so you know where the top should be.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: Android Screen-Resolutions?

Post by DevBoyLars » Wed May 08, 2013 9:39 pm

Great! It's too bad, that there's no option to enter % directly in the inspector!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Android Screen-Resolutions?

Post by jacque » Thu May 09, 2013 5:42 am

One of the stretch goals from the Kickstarter is to add more automatic resizing routines. Many people will cheer when that happens. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: Android Screen-Resolutions?

Post by DevBoyLars » Thu May 09, 2013 9:02 am

Hope that comes soon :D

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Android Screen-Resolutions?

Post by Simon » Thu May 09, 2013 1:45 pm

Hi Lars,
You see now that using this method is the same as I showed you before?
Has something changed?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: Android Screen-Resolutions?

Post by DevBoyLars » Thu May 09, 2013 1:53 pm

Simon wrote:Hi Lars,
You see now that using this method is the same as I showed you before?
Has something changed?

Simon
Yes :) Thx again, I'm trying to work now with the altMobileResizer until LC includes this feature.

I rebuild my latest App from scratch again. There are still some things I'm missing (for example the possibility to show on an iPad another structure as on an iPhone without duplicated buttons in different groups or substacks).

But now I'm thinking that this way will be much better, as you showed me before :)

Post Reply