Distorted view of fields in Android Device

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sc12
Posts: 10
Joined: Mon Jan 11, 2021 2:04 am

Distorted view of fields in Android Device

Post by sc12 » Fri Jan 15, 2021 2:43 am

Hi!

So I tried running my mobile app on Livecode and the layout and everything looks fine on Livecode, however, when I plugged in my Android device and run the app on it, my label fields get cut off. I tried reducing the size of the font but this makes reading hard on livecode. To add on, the font size would look stretched and increased on my Android device. I would attach images to this post after I have hit the target of posting 10 posts!

Does anyone have any idea on how to resolve this issue?

Thanks a lot! :)

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

Re: Distorted view of fields in Android Device

Post by jacque » Fri Jan 15, 2021 6:10 pm

Are you using fullscreenmode? If so, choosing the wrong display option will cause stretching like that.

To allow for different font metrics on Android, make the fields wider than necessary so there's room on other platforms.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm

Re: Distorted view of fields in Android Device

Post by kdjanz » Sat Jan 16, 2021 2:12 am

To increase the size of the stack on your computer, you can use scaleFactor. It will scale things up on your screen but will not affect it on your device when you build a standalone.

Code: Select all

-- Preview the stack appearance on a high-density display
set the scaleFactor of stack "myApp" to 1.5
Just type the command in the message box to try it out.

Good Luck

sc12
Posts: 10
Joined: Mon Jan 11, 2021 2:04 am

Re: Distorted view of fields in Android Device

Post by sc12 » Wed Jan 20, 2021 8:16 am

jacque wrote:
Fri Jan 15, 2021 6:10 pm
Are you using fullscreenmode? If so, choosing the wrong display option will cause stretching like that.

To allow for different font metrics on Android, make the fields wider than necessary so there's room on other platforms.
Yup I'm using fullscreenmode, I tried showAll and it worked on my Android device, thanks! So I have to manually use different options of fullscreenmode for various types of mobile devices?

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

Re: Distorted view of fields in Android Device

Post by FourthWorld » Wed Jan 20, 2021 8:39 am

What does your layout look like? Can you post a screenshot?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Distorted view of fields in Android Device

Post by jacque » Wed Jan 20, 2021 6:42 pm

I almost always use showAll. Sometimes noBorder works better for landscape orientation. The other options aren't very useful on mobile.

You don't need different modes for each device if you're okay with occasional black bars around the card when the screen ratio is different. If you set the stack's backcolor to the same color as the card then the empty surrounding areas will blend into the design and you won't see black bars.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply