Hi all,
i am trying to scroll to the bottom of a scrollview with the following codes:
or
or
But nothing happens.
The SuperScrollview is created into the Designer.
To add elements to the scrollview programmatically i have to write something like
But to do that i have to declare him before somewere like
and adding elements to the scrollview works perfectly but i can't scroll to the bottom programmatically
Somewere in this forum i read that i shouldn't declare the Scrollview (or other elements) that are already created in the designer. Maybe this is why it is not scrolling to the bottom.
So my questions are:
- Why adding elements programmatically to the scrollview works perfectly even if i redeclared the scrollview?
- If i can add elements programatically why i can't scroll to the bottom?
- How to solve the problem?
i am trying to scroll to the bottom of a scrollview with the following codes:
B4X:
SuperScrollview.ScrollPosition = SuperScrollview.Panel.Height
B4X:
SuperScrollview.FullScroll(true)
B4X:
Dim r As Reflector
r.Target = SuperScrollview
r.RunMethod3("scrollTo", 0, "java.lang.int", SuperScrollview.Panel.Height, "java.lang.int")
But nothing happens.
The SuperScrollview is created into the Designer.
To add elements to the scrollview programmatically i have to write something like
B4X:
SuperScrollview.Panel.AddView(.....)
B4X:
Dim SuperScrollview as Scrollview
Somewere in this forum i read that i shouldn't declare the Scrollview (or other elements) that are already created in the designer. Maybe this is why it is not scrolling to the bottom.
So my questions are:
- Why adding elements programmatically to the scrollview works perfectly even if i redeclared the scrollview?
- If i can add elements programatically why i can't scroll to the bottom?
- How to solve the problem?