iOS Question ScrollView does not cover the screen

toro1950

Active Member
Licensed User
I have a ScrollView that I scroll a panel with over 60 labels inside. It all works correctly but I can't see it in full, that is in width,
I can't cover the entire screen, on the iPhone it doesn't cause problems because there are a few pixels missing from the edge,
but testing it on the iPad it doesn't even cover half the screen. To make the iPad screen similar to the iPhone's I'm using scripts,
which work great for other objects but not for the ScroolView. In the drawing of the same I try to make it go out of the designated
area but nothing changes, I'm attaching the script. The scvTest is ScrollView
B4X:
'All variants script
larg = 100%x
Alt = 100%Y
If Alt/larg < 1.5 Then
'iPad
AS_DatePicker1.Width = 70%x
AS_DatePicker1.Height = 26%y
Labconfig.left=82%x
Telef.Left= 84%x
whats.Left=84%x
Label1.Left=82%x
labora.left=82%x
Buttmostra.Left=82%x
labora.Top=26.5%y
editpren.Top=26.5%y
RadioC1.Top=26.5%y
RadioC2.Top=30%y
RadioC1.left=60%x
RadioC2.left=60%x
Labfesta.Top =30%y
editpren.Left=38%X
Labfesta.left =36%x

scvTest.Top =33%y
scvTest.Height =90%y
scvTest.Width =98%x
Panel1.Top=32%y
Panel1.Width=40%x
Panel1.Height=22%y
Panel1.left=20%x

labora.left=20%x


Else
'iphone
AS_DatePicker1.Width = 72%x
AS_DatePicker1.Height = 26%y
labora.Top =28%y
editpren.Top =28%y
RadioC1.Top =28%y
RadioC2.Top =32%y
Labfesta.Top =32%y
scvTest.Top =35%y
scvTest.Height =90%y
scvTest.Width =96%x
Panel1.Top=36%y
Panel1.Width=80%x
Panel1.left=10%x
listavisite.Width=70%x
editpren.Left=30%X
Labfesta.left =30%x
End If
 

toro1950

Active Member
Licensed User
Thanks Klaus for reporting the distraction, but this does not solve my problem because the error is on the X and not on the y.
I can't understand that on other objects I have no problems, maybe there is something to set on the scrollView. I tried to
eliminate the percentages and I gave an x measurement greater than 600 pixel, I colored the background to understand better,
I also brought the 60 labels to a measurement of over 600, but on my iPhone 12 mini it leaves about two mm uncovered,
on the iPad it does not even cover half of the screen
 
Upvote 0

toro1950

Active Member
Licensed User
Good morning to the whole community, Klaus here is the example, also tested on ipad, as you will see the labels are exaggerated, the panel that contains the scrollview is exaggerated, I did not insert percentages, but the result does not change. Note: the same app on android does not have these problems
 

Attachments

  • testscroll.zip
    6 KB · Views: 32
Upvote 0

klaus

Expert
Licensed User
Longtime User
You application is a B4XPages project therefore to zip the project you must click on the line above on top of the B4XMainPage.
B4X:
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip

Your layouts are very strange because you have a variant for 320 * 568 and the widths of your panels and some vies inside are wider than the screen, this cannot work.
You might adjust the widths to the screen width and use anchors.
Currently i cannot test your project because my B4iBridge does not work anymore.

Attached your project with the modified layout.
 

Attachments

  • testscroll1.zip
    6 KB · Views: 25
Upvote 0

toro1950

Active Member
Licensed User
Klaus my layouts were strange because I wanted to point out that even if off-screen then once compiled they never reach the end
of the right of the real screen, on the iPad not even halfway through the screen. I took what you sent me but the problem remains,
since on Android I have no problems I suspect that it is a bug in B4i, Since B4i-Bridge does not work for you I reattach the zipped
file in the right way so that someone else can try it and possibly give me a solution, in any case I thank you for your commitme
 

Attachments

  • testscroll.zip
    6 KB · Views: 23
Upvote 0

klaus

Expert
Licensed User
Longtime User
Since B4i-Bridge does not work for you I reattach the zipped
file in the right way
What do you mean with 'the right way' ?
To zip the last project in post #8 did you click on this line ?
B4X:
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
If yes, then the structure of your B4XPages project seems to be wrong.
The structure should look like explained HERE.
How did you create this project ?

The layout in post #8 is not the same as in post #6 and is also different from what i posted in #7 ?
 
Upvote 0

toro1950

Active Member
Licensed User
klaus maybe the structure is wrong, but my App has 5 pages and if there was something wrong I should have had problems from B4i. I followed your instructions for the zip, but it always gives me problems if I reuse it, and so does yours that you corrected, if I create it myself the zip of the folder works but it is too big for the forum (550 Kb). I saw that only you and b4x-de were interested, so I ask for help from others too, someone will surely have used scrollView on iPad, if not they have found problems could they help me. On iPhone it is difficult to notice that only a few pixels are missing from the edge of the screen
 
Upvote 0

toro1950

Active Member
Licensed User
Good morning, I solved it, the problem was not the ScrollView, but the labels of the scrollviewlayout. I apologize for the error
 
Upvote 0

toro1950

Active Member
Licensed User
Trying to understand what was happening or given the thickness at the edge of the panels and whatever else and
there I realized that everything fit except for the over 50 labels that always remained as I had built them, then in
the script I brought them to 98%X and everything was resolved, without thickness I would never have gotten there
 
Upvote 0
Top