Hi All
I am trying to ensure the ScrollViewInnerPanel aligns with scrollview in CLV.
I don't even know if aligning is possible/needed I am just speculating that this may the cause of a small problem. It looks simple enough.
I have tried the code below but it throws the error shown.
The last line of the code above causes the error shown below.
Q1. Is it possible to align sv with ScrollViewInnerPanel? If not I will try something else.
Q2. What am I doing wrong?
Regards Roger
I am trying to ensure the ScrollViewInnerPanel aligns with scrollview in CLV.
I don't even know if aligning is possible/needed I am just speculating that this may the cause of a small problem. It looks simple enough.
I have tried the code below but it throws the error shown.
B4X:
CLV.GetBase.Height = 100%y - LBLTitle.Height 'Set height of CLV
CLV.GetBase.Top = LBLTitle.Height 'Set position of CLV on Activity/Panel
CLV.sv.Height =CLV.GetBase.Height 'Set sv to same height as CLV
CLV.sv.Top = CLV.getbase.Top 'Align top of sv with top of CLV
CLV.sv.ScrollViewInnerPanel.Top = CLV.sv.Top 'Should align top of ScrollViewInnerPanel with top of sv but crashes
The last line of the code above causes the error shown below.
No wakelock.
main_settingsmenu (java line: 17238)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to anywheresoftware.b4a.BALayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.setTop(ViewWrapper.java:188)
at anywheresoftware.b4a.objects.B4XViewWrapper.setTop(B4XViewWrapper.java:126)
at b4a.C_Calc.main._settingsmenu(main.java:17238)
at b4a.C_Calc.main._alllistview_itemclick(main.java:3613)
Q1. Is it possible to align sv with ScrollViewInnerPanel? If not I will try something else.
Q2. What am I doing wrong?
Regards Roger