Android Question I see Layout before designer script work

BaGRoS

Active Member
Licensed User
Hi
I set up designer script
B4X:
lblTytul.Left = 0%x
lblTytul.Width = 100%x
lblTytul.Top = 10%y
lblTytul.TextSize= lblTytul.TextSize + (((100%x + 100%y) / (320dip + 480dip) - 1) * 3)
lblTytul.Height = 65dip
and look allmost good. I need a little help with lblTytul.Height = 65dip for better support.
And when Activity.LoadLayout("Start_Layout") then I see a fraction of a second smaller image and at the moment set by the script.

I have layout without title...

tested on MM 6.0.1 Samsung S7
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
It is not related to designer script at all.
Note that you should call AutoScaleAll instead of manually scaling the text size.


You can remove the action bar from the manifest:
B4X:
SetApplicationAttribute(android:theme, "@style/NoActionBar")
CreateResource(values-v20, theme.xml,
<resources>
  <style
  name="NoActionBar" parent="@android:style/Theme.Material.NoActionBar">
  </style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
  <style
  name="NoActionBar" parent="@android:style/Theme.Holo.NoActionBar">
  </style>
</resources>
)
This will work on Android 4+.
 
Upvote 0
Top