When I use SetTabLeft(tabstrip As TabStrip,left As Int,Position As Int)
throws this:
How to solve this problem?
B4X:
panel.Initialize("")
Activity.AddView(panel,0,0,100%x,90%y)
panel.LoadLayout("tabstrip")
tabstrip1.LoadLayout("shengmu","page1")
tabstrip1.LoadLayout("yunmu","page2")
tabstrip1.LoadLayout("shengdiao","page3")
panel.Visible=False
tabstripview.SetTabLeft(tabstrip1,20dip,tabstrip1.CurrentPage)
throws this:
B4X:
** Activity (main) Resume **
** Activity (main) Create, isFirst = true **
Panel size is unknown. Layout may not be loaded correctly.
Error occurred on line: 200 (tabstripview)
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to anywheresoftware.b4a.BALayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.setLeft(ViewWrapper.java:182)
at dh.apk.tabstripview._settableft(tabstripview.java:79)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at dh.apk.main.afterFirstLayout(main.java:104)
How to solve this problem?