Android Question CustomListView Item Click

yzeflores

Member
So I used CLV for my project and I wanted that when an item is clicked, it will start another activity... but even tho there were no errors on my code it does not work... what am I missing?

here is my code:

B4X:
Sub CustomListGr1_ItemClick (Index As Int, Value As Object)
    If Value = "Attendance" Then
        StartActivity(AttendanceList)
    End If

I used this code in ListView and it worked just fine but when I used it in CLV it doesn't.
 

mangojack

Expert
Licensed User
Longtime User
I did the breakpoint but still... it won't start the activity :(((((

Upload a simple example that shows your problem.
File > Export as Zip
 
Upvote 0

yzeflores

Member
B4X:
If Index = 0 Then
        StartActivity(AttendanceList)
    End If

I found out the problem Sir. I shouldn't have used Value because it finally worked when I changed it into Index. Thank you very much for answering my questions you all have been very helpful to me as a beginner.
 
Upvote 0
Top