App size

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Opaquer
Posts: 247
Joined: Wed Aug 14, 2013 8:24 am

App size

Post by Opaquer » Thu Aug 15, 2013 12:53 am

Hi everyone! I have a quick question

I'm making an app currently for my Galaxy S3, but I'm having a few issues with it. Firstly, I've got this code:

set the height of button "Tab1" to 0.8*the height of this stack

I've got the same code for other buttons/groups/fields I have. When I'm testing it, it's working fine on computer - if the stack is 500 pixels high, tab1 is going to be 400 etc. But, when I put it onto my phone, for some reason it's only taking up half the screen. Even if I put "answer the height of this stack" first, it comes up saying 631 or so instead of the full 1280 or whatever the S3 is meant to be.

My second issue is text size. I had a standard text size first, but then realised when I put it on my S3 that it would be too small, so I used this code:

switch
case tWidth <= 360
put 12 into tFontSize
put 21 into downspace
break
case tWidth <= 1200
put 24 into tFontSize
put 32 into downspace
break
default
put 16 into tFontSize
put 28 into downspace
end switch

From here, I'd make the textsize of the various buttons/fields etc equal to tfontsize. I was just wondering if there was a more universal way so that it would work on any phone :D

Thanks in advanced

Ricardo A
Posts: 15
Joined: Tue Jun 14, 2011 1:42 pm

Re: App size

Post by Ricardo A » Sat Aug 17, 2013 3:17 pm

I am having the same problem with the variation of Android screen sizes.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: App size

Post by FourthWorld » Sat Aug 17, 2013 4:28 pm

Good news on this front in a recent RunRev newsletter:
Resolution Independence
Driven by Ian MacPhail
The aim of this project is to take away the need to LiveCode developers to do extra work when creating an app that is required to run on devices with different screen densities. For example, developers who write an app for the iPad2 (1024x768) currently have to manually upscale their objects, graphics and images by hand to support the iPad3 (2048x1532). With resolution independence, LiveCode will perform all this scaling automatically as well as selecting the appropriate density of image from your app bundle. Users will be able to create an app at one scale and let LiveCode scale it up or down to meet to density of the screen of the target device.

Progress report: LiveCode can now display a stack at any scale on Mac and iOS! We are busy porting this to all platforms at the moment. The final step is to update the image object to select the appropriate density of image automatically.
The estimated release of a test version for this project is the end of August.
http://newsletters.livecode.com/july/is ... etter1.php
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Opaquer
Posts: 247
Joined: Wed Aug 14, 2013 8:24 am

Re: App size

Post by Opaquer » Sat Aug 17, 2013 8:31 pm

That is indeed good news :D!

Post Reply