ScrollView Not Scrolling?

disit11

Member
Hey guys for some reason my scrollview will not scroll any ideas why? I added a scrollview and put a button,label and Imageview on top of it and it will not scroll at all.
 

Inman

Well-Known Member
Licensed User
Longtime User
Scrollview will scroll only if the views "overflow" within a scrollview. That is, the views must be placed in such a way that they cannot be seen together without scrolling.

Also make sure the scrollview.panel.height is greater than scrollview.height.
 
Upvote 0

disit11

Member
Scrollview will scroll only if the views "overflow" within a scrollview. That is, the views must be placed in such a way that they cannot be seen together without scrolling.

Also make sure the scrollview.panel.height is greater than scrollview.height.

Tried all of that and it still wont scroll.
 
Upvote 0

disit11

Member
You should be more patient.

Please post your code (or upload your project).

Ok so here is exactly what I did I created a layout and called it BulbLayout and then within that layout I added 4 Views a scrollview which is in the back and then a button,imageview, and a label. Then I added this code:

B4X:
ScrollView1.Panel(BulbLayout)

This will throw and error when I try to do this. I am lost on how to do this.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You must post your project as a zip file (IDE menu Files / Export As Zip).
Otherwise it's impossible to help you as we don't know what you have done and how and where.
If BulbLayout is the layout file name then the code to load the layout is:
B4X:
ScrollView1.Panel.LoadLayout("BulbLayout")
Best regards.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Attached you find the modified version.
- You need two layouts
-- one for the main screen with the ScrollView and perhaps other views.
-- one for the ScrollView.Panel content

Best regards.
 

Attachments

  • testp1.zip
    7.3 KB · Views: 269
Upvote 0
Top