** 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)
Public Sub SetTabLeft(tabstrip As TabStrip,left As Int,Position As Int)
Dim i As Int
For Each lbl As Label In GetAllTabLabels(tabstrip)
If i = Position Then
lbl.Left = left
End If
i = i + 1
Next
End Sub
** Activity (main) Create, isFirst = true **
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)
I guess that's not the problem. when use SetTabHeight(tabstrip As TabStrip,height As Int,Position As Int),it works well.
Public Sub GetAllTabLabels (tabstrip As TabStrip) As List
Dim jo As JavaObject = tabstrip
Dim r As Reflector
r.Target = jo.GetField("tabStrip")
Dim tc As Panel = r.GetField("tabsContainer")
Dim res As List
res.Initialize
For Each v As View In tc
If v Is Label Then res.Add(v)
Next
Return res
End Sub
For Each lbl As Label In Main.fun.GetAllTabLabels(ts_main)
lbl.Width = Round(Activity.Width/3)
Next
Public Sub GetAllTabLabels (tabstrip As TabStrip) As List
Dim jo As JavaObject = tabstrip
Dim r As Reflector
r.Target = jo.GetField("tabStrip")
Dim tc As Panel = r.GetField("tabsContainer")
Dim res As List
res.Initialize
For Each v As View In tc
If v Is Label Then res.Add(v)
Next
Return res
End Sub
For Each lbl As Label In Main.fun.GetAllTabLabels(ts_main)
lbl.Width = Round(Activity.Width/3)
Next