Hi all,
My B4A app use xCustomListView from here and i also create custom checkbox, i want to change of using standard/built-in checkbox with my own custom checkbox.
I want the custom checkbox act just like standard checkbox in this sample
I get this error:
The log says:
Logger connected to: 192.168.9.101:5555
--------- beginning of /dev/log/main--------- beginning of /dev/log/system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Class not found: anywheresoftware.b4a.samples.customlistview.customlistview, trying: b4a.example3.customlistview
Class not found: anywheresoftware.b4a.samples.customlistview.customlistview, trying: b4a.example3.customlistview
** Activity (main) Resume **
customlistview_getitemfromview (java line: 388)
java.lang.ClassCastException: b4a.example3.b4acheckbox cannot be cast to android.view.View
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:48)
at anywheresoftware.b4a.objects.B4XViewWrapper.getParent(B4XViewWrapper.java:117)
at b4a.example3.customlistview._getitemfromview(customlistview.java:388)
at b4a.example3.main._b4acheckbox1_valuechanged(main.java:378)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1038)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:993)
at b4a.example3.b4acheckbox._dotpanel_click(b4acheckbox.java:120)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
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:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Any help would be appreciated and thank you for your time
My B4A app use xCustomListView from here and i also create custom checkbox, i want to change of using standard/built-in checkbox with my own custom checkbox.
I want the custom checkbox act just like standard checkbox in this sample
I get this error:
B4X:
Sub b4aCheckBox1_ValueChanged (Value As Boolean)
Dim index As Int = clv2.GetItemFromView(Sender) '<--- error here
Dim pnl As B4XView = clv2.GetPanel(index)
Dim chk As B4XView = pnl.GetView(2)
MsgboxAsync($"Item value: ${clv2.GetValue(index)} Check value: ${chk.Checked}"$, "")
End Sub
The log says:
Logger connected to: 192.168.9.101:5555
--------- beginning of /dev/log/main--------- beginning of /dev/log/system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Class not found: anywheresoftware.b4a.samples.customlistview.customlistview, trying: b4a.example3.customlistview
Class not found: anywheresoftware.b4a.samples.customlistview.customlistview, trying: b4a.example3.customlistview
** Activity (main) Resume **
customlistview_getitemfromview (java line: 388)
java.lang.ClassCastException: b4a.example3.b4acheckbox cannot be cast to android.view.View
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:48)
at anywheresoftware.b4a.objects.B4XViewWrapper.getParent(B4XViewWrapper.java:117)
at b4a.example3.customlistview._getitemfromview(customlistview.java:388)
at b4a.example3.main._b4acheckbox1_valuechanged(main.java:378)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1038)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:993)
at b4a.example3.b4acheckbox._dotpanel_click(b4acheckbox.java:120)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
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:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Any help would be appreciated and thank you for your time