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.
First TabStrip page:
Second TabStrip page:
Why it happens? How to solve this problem?
Program code:
I tried the same code on another device and there are check marks on the first and second page, but not on the third and fourth.
First TabStrip page:
Second TabStrip page:
Why it happens? How to solve this problem?
Program code:
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
#AdditionalJar: com.android.support:support-v4
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private CheckBox1 As CheckBox
Private CheckBox2 As CheckBox
Private CheckBox3 As CheckBox
Private CheckBox4 As CheckBox
Private CheckBox5 As CheckBox
Private CheckBox11 As CheckBox
Private CheckBox21 As CheckBox
Private CheckBox31 As CheckBox
Private CheckBox41 As CheckBox
Private CheckBox51 As CheckBox
Private CheckBox12 As CheckBox
Private CheckBox22 As CheckBox
Private CheckBox32 As CheckBox
Private CheckBox42 As CheckBox
Private CheckBox52 As CheckBox
Private CheckBox13 As CheckBox
Private CheckBox23 As CheckBox
Private CheckBox33 As CheckBox
Private CheckBox43 As CheckBox
Private CheckBox53 As CheckBox
Private TabStrip1 As TabStrip
Private clv1 As CustomListView
Private clv2 As CustomListView
Private clv3 As CustomListView
Private clv4 As CustomListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Activity.TitleColor=Colors.White
TabStrip1.LoadLayout("c1", "КАНАЛ 1")
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, clv1.AsView.Width, (Activity.Height*1.45)+50)
p.LoadLayout("1")
clv1.Add(p,"")
TabStrip1.LoadLayout("c2", "КАНАЛ 2")
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, clv2.AsView.Width, (Activity.Height*1.45)+50)
p.LoadLayout("2")
clv2.Add(p,"")
TabStrip1.LoadLayout("c3", "КАНАЛ 3")
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, clv3.AsView.Width, (Activity.Height*1.45)+50)
p.LoadLayout("3")
clv3.Add(p,"")
TabStrip1.LoadLayout("c4", "КАНАЛ 4")
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, clv4.AsView.Width, (Activity.Height*1.45)+50)
p.LoadLayout("4")
clv4.Add(p,"")
CallSubDelayed(Starter,"gostarter")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub AllCheck
CheckBox1.Checked=True
CheckBox2.Checked=True
CheckBox3.Checked=True
CheckBox4.Checked=True
CheckBox5.Checked=True
CheckBox11.Checked=True
CheckBox21.Checked=True
CheckBox31.Checked=True
CheckBox41.Checked=True
CheckBox51.Checked=True
CheckBox12.Checked=True
CheckBox22.Checked=True
CheckBox32.Checked=True
CheckBox42.Checked=True
CheckBox52.Checked=True
CheckBox13.Checked=True
CheckBox23.Checked=True
CheckBox33.Checked=True
CheckBox43.Checked=True
CheckBox53.Checked=True
End Sub
Attachments
Last edited: