Hi, I have a custom list view and every time I click an item a panel is showing right on top of it. But it would be great to keep the item selected so the user can keep the view on which item he selected. I ve been looking around but it doesn't seem there is a way to keep the item selected, at least, until the panel is displaying right above.. Thanks
This class extends xCustomListView library and adds more selection modes: MODE_SINGLE_ITEM_TEMP - The same as the default behavior. MODE_SINGLE_ITEM_PERMANENT - Single item is selected and the selection remains. MODE_MULTIPLE_ITEMS- Multiple items can be selected. There is also a helper method...
This class extends xCustomListView library and adds more selection modes: MODE_SINGLE_ITEM_TEMP - The same as the default behavior. MODE_SINGLE_ITEM_PERMANENT - Single item is selected and the selection remains. MODE_MULTIPLE_ITEMS- Multiple items can be selected. There is also a helper method...
but as soon as I debug, it shows the following error message
B4X:
Logger connected to: samsung SM-G985F
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 35 (CLVSelections)
java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference
at b4a.example3.customlistview._getsize(customlistview.java:493)
at Chiavii.ronda.clvselections._refresh(clvselections.java:251)
at Chiavii.ronda.clvselections._setmode(clvselections.java:188)
at Chiavii.ronda.b4xmainpage._initialize(b4xmainpage.java:917)
at Chiavii.ronda.b4xpagesmanager._initialize(b4xpagesmanager.java:153)
at Chiavii.ronda.main._activity_create(main.java:420)
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:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146)
at Chiavii.ronda.main.afterFirstLayout(main.java:105)
at Chiavii.ronda.main.access$000(main.java:17)
at Chiavii.ronda.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
** Activity (main) Resume **
the line 35 in the class is
B4X:
Public Sub Refresh
VisibleRangeChanged(0, mCLV.Size - 1)
End Sub
@mcqueccu just a thing..
How can I parse it as a boolean?
I mean how can i do something like this
if item is clicked then
panel.visible=true
else
item clicked.clear
?