Listview click not triggered when user selects

vaughanwj

Member
Licensed User
Longtime User
Hi this is my first post, so I hope you'll forgive any etiquette errors.

I am having a problem where, when an item is selected on a listview, if that item is not actively clicked (i.e. the user just scrolls to it) the itemclick event is not triggered and the index doesn't change. Does anyone have a workaround for this?

On the layout, the user selects an item from list1 then from list2 and presses 'go' to start the next activity.

Sub list2_ItemClick (Position As Int, Value As Object)
ln2Pos = Position
ToastMessageShow(Value,False)
End Sub

The toast pops up only when they click, so when they don't the global variable ln2pos is left at its initial value (0).

I hope what I'm asking for is clear. Anyone have a solution?
Thanks,
Vaughan
 

JonPM

Well-Known Member
Licensed User
Longtime User
Like you mentioned, the ItemClick sub is only called with the row is physically clicked. So none of your code will work if you are just scrolling.
You can take a look at this library. I think it is exactly what you need
 
Upvote 0

vaughanwj

Member
Licensed User
Longtime User
Can't find the jar file in the zip?

Like you mentioned, the ItemClick sub is only called with the row is physically clicked. So none of your code will work if you are just scrolling.
You can take a look at this library. I think it is exactly what you need

Hi Jon,
Thanks for answering. I downloaded the zip file you linked to but there was no library file in it, just the example app (which won't work without the library). Am I missing something?

Thanks,
Vaughan
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
When you open the zip file, you will see the 2 library files which are: ListViewWithSE.jar and ListViewWithSE.xml. Put both of them in the Additional library folder. Then, while at the IDE, click the Libs tab in the bottom right hand side corner. Then right click and select 'Refresh'. After you refresh and see the new lib in the list. Then put a check mark to the left of it to activate it. That is all.
 
Upvote 0
Top