Hello, i'm having some problems while trying to align and dock views added from code.
For example if i were using the designer i would dock two labels in this way from the designer script:
label2.top = label1.bottom, that's ok.
But what when i've added all views from code? How i can dock the various views so that i will get the same result in all different screens?
I've tried messing with %x and %y but i don't think is the correct way, infact the app will look different from screen to screen.
For example here i am using an action bar and i want to dock my ads exactly under the action bar, the code is not complete but understandable.
Thank you
For example if i were using the designer i would dock two labels in this way from the designer script:
label2.top = label1.bottom, that's ok.
But what when i've added all views from code? How i can dock the various views so that i will get the same result in all different screens?
I've tried messing with %x and %y but i don't think is the correct way, infact the app will look different from screen to screen.
For example here i am using an action bar and i want to dock my ads exactly under the action bar, the code is not complete but understandable.
B4X:
ActionBar.Initialize(Activity, Me, "Manager", Null, Colors.ARGB(255, 83, 90, 175), Colors.ARGB(255, 47, 35, 86), True, True, False)
Activity.AddView(adbox, 0dip, 27%y - height, 100%x, height)
Thank you
Last edited: