feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR

Home Page:https://feathersui.com/learn/as3-starling/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Label and other subcomponent labels not shown correctly on android devices

rzv86 opened this issue · comments

commented

This happens on labels, all kind of labels (buttons, trees, etc), on devices with android >=7.0

ss

Labels are shifted down on my samsung s8 (android 7), samsung s8 (android 9) and lenovo tab p10 (android 9), using air sdk 32, starling 2.5.1, feathers 4.0. This happens even on older air sdk / starling versions and feathers 3.5.
However, this doesn't happen on my older devices samsung note p-600(android 5.1.1) and huawei mediapad m2 10(android 5.1.1).

TextFields and Buttons from starling are displayed correctly on all platforms.

I've tried many solutions, none to work.
One workaround is setting paddingTop = - x, but it's not ok because this value is related to textFormat size and must be adjusted accordingly to it's size,
e.g: so if we have a text size of 16, paddingTop is ~ -4, if we set text size to 60, then paddingTop must be ~ -20.
Also, the device's resolution has something to do with it because labels are shifted down differently on my mobile devices.

Thank you,

Are you using an embedded font? Which text renderer are you using?

commented

I'm using embedded fonts from my .fla library.
The default text renderer, I didn't set any.

You might try using a different font to see if that makes a difference. It's been my experience that some fonts don't properly report their measurements, and it can lead to issues like these.

If you're using a font embedded in a .fla file, then you're probably not using the default text renderer, which is BitmapFontTextRenderer. Embedded fonts are compatible with either TextFieldTextRenderer or TextBlockTextRenderer.

If you're using some kind of theme, it might be customizing the default text renderer.

commented

I'm using metalworks mobile theme with some little adjustments on object's colors.

I need to embedd arial bold and regular in my app, but I don't know how to obtain them.
Can you please help me with those? Or maybe point me to some reference documentation.

My app has landscape aspect ratio set, I've mentioned it just in case..

MetalWorksMobileTheme uses TextBlockTextRenderer.

When you embed a font in the library of your .fla file, you need to set its Outline format to FTE (DF4) to be compatible with TextBlockTextRenderer. If it is embedded as Classic (DF3), TextBlockTextRenderer won't use it.

commented

Worked like a charm!!

Thanks a lot for your help!

I am having trouble with another problem, but I'm sure that has nothing to do with feathers.
All my input texts which are initially positioned bellow keyboard (bellow half stage) are not shown after keyboard appears. TextInput case (background) is displayed but not the text that I had typed in it.
I've tried with flash stageText and it's the same problem.

@rzv86 Great! I recommend moving further discussion to: https://forum.starling-framework.org.

You'll get a little more visibility from the community, so it's not just me answering questions.