Android Question How to change the ScrollViewHeight of xCustomListView?

Riddle Ling

Member
Licensed User
Hi, I want to change the ScrollViewHeight of xCustomListView in Runtime.
But It is not work (Crash):
B4X:
CustomListView1.GetBase.ScrollViewContentHeight = 40dip * 20

Crash log:
B4X:
Error occurred on line: 43 (Main)
java.lang.RuntimeException: Type does not match (class anywheresoftware.b4a.BALayout)
    at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:287)
    at anywheresoftware.b4a.objects.B4XViewWrapper.getScrollViewPanel(B4XViewWrapper.java:385)
    at anywheresoftware.b4a.objects.B4XViewWrapper.getScrollViewInnerPanel(B4XViewWrapper.java:391)
    at anywheresoftware.b4a.objects.B4XViewWrapper.setScrollViewContentHeight(B4XViewWrapper.java:401)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
    at b4a.example.main.afterFirstLayout(main.java:104)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7231)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

How can I do it?
Thank!
 
Top