Android Question Panel with scroll not fixed height

Sberla

Active Member
Licensed User
Longtime User
Hello,
I am trying to create a panel with scroll , but have a problem with panel layout.
between the scroll.panel.height=panel1.height there is a huge amount of space.

if I define the height from the layout it cuts the last button view, if I leave space between the last button view and the panel bottom border there is a hug amount of space.

How can I define the exact space up to the last button view and panel bottom border and eliminate the space between ??


B4X:
Activity.LoadLayout("2")
   
    scrview.Panel.LoadLayout("1")
    scrview.Panel.Height=Panel1.Height
 

Attachments

  • pic1.png
    pic1.png
    1.8 KB · Views: 184
  • pic2.png
    pic2.png
    6.9 KB · Views: 191
  • pic3.png
    pic3.png
    5.8 KB · Views: 185
  • pic4.png
    pic4.png
    5.9 KB · Views: 195

FrankBerra

Active Member
Licensed User
Longtime User
You sholud also take care about the height of the scrollview itself:
B4X:
scrview.Height= ...

for example with something like:

B4X:
if Panel1.Height < 100%y then
   scrview.Height=Panel1.Height
else
   scrview.Height=100%y
end if
 
Upvote 0
Top