Android Question script result not matched

Mostez

Well-Known Member
Licensed User
Longtime User
I run this script to place views, I tested the result on three different devices, 7" tab, Samsung Prime phone , and Samsung A01 phone, the first two devices are OK, the third one with soft navigation buttons shifts the panel down (pnlOKCancel) though it is OK also on the designer, any ideas how to place this panel correctly?

B4X:
AutoScaleAll
svScrollView.Height = 88%y
pnlOKCancel.HorizontalCenter = 50%x
pnlOKCancel.bottom = 99%y
Screenshot_20201224-154522.png Screenshot_20201224-154527.jpg et_ssh.jpg
 

kisoft

Well-Known Member
Licensed User
Longtime User
Hello
You can show how you anchored it in the designer...It is a good idea to clean the project after each layout change (ctrl + p).
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
On the bottom panel, give all 4 anchors and adjust the rest of the layout to that panel. Delete Script in Designer ... Takes precedence over anchors ...
 
Upvote 0

Mostez

Well-Known Member
Licensed User
Longtime User
the project, and a screenshot of the running application
Screenshot_20201228-105401.jpg
 

Attachments

  • single_panel.zip
    10.6 KB · Views: 132
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
Something strange happens when I add a scrollview to the designer. I don't know if it's supposed to be this way ...
scrol.png
Screenshot_20201228-114906.png
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Mostez

Well-Known Member
Licensed User
Longtime User
firstly thank you so much Erel for your help,

I'm sorry but I don't understand anything from this thread.
I have a layout gives a result on designer that is different from the result on device at run time. A panel is shifted down more than expected at run time

Why are you posting a screenshot of a different layout???
I just did what you've instructed me to do on post #9,
Upload a project with the single panel (nothing else) that doesn't appear as you expect. Also post a screenshot of the running app.

they should look different because the layout in the zipped project only contains the panel, the layout you see in the screen shot is another one, it is loaded into the scrollview, the scrollview is loaded into tabstrip.

B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("triprequests") ' The layout that contains tabstrips only
    tabTripRequests.LoadLayout("ScrollViewButtons", Chr(0xF044) & " Edit" ) 'The layout that looks different
    svScrollView.Panel.Height = 800dip
    svScrollView.Panel.LoadLayout("triprequestslayout") ' The layout in screen shot
    ime.Initialize("ime")
    ime.AddHeightChangedEvent
    tabTripRequests.LoadLayout("sqldatabrowser", Chr(0xF1DA) & " Today" ) 'data table in tab1
    tabTripRequests.LoadLayout("sqldatabrowserdetails", Chr(0xF0D1) & " Trips" ) 'data table in tab2


Thank you so much again
 
Upvote 0
Top