Sub CheckBox1_Click()
Dim index As Int = clv1.GetItemFromView(Sender)
Log($" Checkboxx ${index+1} has been clicked ... "$)
'uncheck other checkbox /s
For i = 0 To clv1.Size -1
If i <> index Then
Dim p As B4XView = clv1.GetPanel(i)
Dim chk As B4XView = p.GetView(2) '@@ assuming checkbox is 3rd view in panel
chk.Checked = False
End If
Next
End Sub
checkbox click
Checkboxx 4 has been clicked ...
main_checkbox1_click (java line: 1929)
java.lang.RuntimeException: Object should first be initialized (View).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.B4XViewWrapper.GetView(B4XViewWrapper.java:298)
at net.nowyouseeme.lottery.loteria._checkbox1_click(loteria.java:1929)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:4438)
at android.widget.CompoundButton.performClick(CompoundButton.java:100)
at android.view.View$PerformClick.run(View.java:18439)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5095)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
Dim chk As B4XView = p.GetView(1)