Hi Erel,
I have added the custom list view from the designer.
Initially i am checking whether the checkbox is checked and if it true i am setting the checkbox.checked = true. After this it is calling the
Sub chk_CheckedChange(Checked As Boolean) and getting the below error - Null Pointer Exception.
Kindly let me know your Inputs.
loadlanguagelistview_chk_checkedchange (B4A line: 105)
index = clv1.GetItemFromView(Sender)
java.lang.NullPointerException
at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod(Reflection.java:205)
at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod(Reflection.java:802)
at anywheresoftware.b4a.samples.customlistview.customlistview._getitemfromview(customlistview.java:150)
at com.bayalu.mankutimma.loadlanguagelistview._chk_checkedchange(loadlanguagelistview.java:348)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.objects.CompoundButtonWrapper$1.onCheckedChanged(CompoundButtonWrapper.java:43)
at android.widget.CompoundButton.setChecked(CompoundButton.java:137)
at anywheresoftware.b4a.objects.CompoundButtonWrapper.setChecked(CompoundButtonWrapper.java:53)
at com.bayalu.mankutimma.loadlanguagelistview._createlistitem(loadlanguagelistview.java:464)
at com.bayalu.mankutimma.loadlanguagelistview._createlanguagelist(loadlanguagelistview.java:396)
at com.bayalu.mankutimma.loadlanguagelistview._loadlistview(loadlanguagelistview.java:595)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$4.run(Common.java:930)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
at dalvik.system.NativeStart.main(Native Method)
Note : Before i was not bothered about the checkbox status and it was working fine.
Regards,
SK