Bug? TabStrip bug

red30

Active Member
Licensed User
I am using TabStrip. Each page contains a CustomListView. Each CustomListView contains 5 CheckBoxes. If I call a subroutine in the Starter that calls a subroutine in the Main Activity, then on the second and subsequent pages of the TabStrip the checkbox for the CheckBox is not displayed. Moreover, the frame is highlighted as if CheckBox Checked, but there is no check mark itself.
The call to the subroutine in the Starter that calls the subroutine in the Main Activity is made specifically to demonstrate the error.
Screenshots of all TabStrip pages after the "AllCheck" subroutine:
Screenshot_20211031-190902.pngScreenshot_20211031-190907.pngScreenshot_20211031-190911.pngScreenshot_20211031-190916.png
In topic "CLV + TabStrip + CheckBox. Strange bug.", Mahares suggested a solution:
B4X:
Sub RefreshTabStrip(ts As TabStrip)
    Dim jo As JavaObject = ts
    jo.RunMethod("resetAdapter", Null)
    jo.GetFieldJO("vp").RunMethodJO("getAdapter", Null).RunMethod("notifyDataSetChanged", Null)
    jo.GetFieldJO("tabStrip").RunMethod("notifyDataSetChanged", Null)
End Sub
This solution works, maybe you should add it to the TabStrip library? Or how to fix this bug differently?
P.S. The same bug occurs if RadioButton is used instead of CheckBox.
 

Attachments

  • testliana.zip
    19.4 KB · Views: 28
Top