If I try to get the index of the B4XSeekBar in CustomListView I get the error:
How can I get the index of the B4XSeekBar in CustomListView?
B4X:
Sub B4XSeekBar1_ValueChanged (Value As Int)
Dim index As Int = allclv.GetItemFromView(Sender)
Log(index)
End Sub
B4X:
Error occurred on line: 209 (Main)
java.lang.ClassCastException: b4a.example.b4xseekbar cannot be cast to android.view.View
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:88)
at anywheresoftware.b4a.objects.B4XViewWrapper.getParent(B4XViewWrapper.java:185)
at b4a.example3.customlistview._getitemfromview(customlistview.java:413)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6865)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:504)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)