Android Question ListView_ItemClick needs many click to work

Idan Arad

Member
Licensed User
Longtime User
Hi
Maybe someone can help:
I have a list view with few options to choose from.

On galaxy s2 with android 4.4 : clicking the listview items - nothing happens at the beginning.
I need to click the items many times , with no respond , until eventually it starts to work.

the same code run with no issues on Nexus 5 with android 5.1.

I guess I am breaking some kind of compatability here...
Sub listviewMenu_Itemclick (Position As Int, Value As Object)

If (Position=0) Then
StartActivity(...)

Else If (Position=1) Then
Msgbox(...)

Else If (Position=2) Then
Msgbox(...)
Else
Msgbox (...)
End If

End Sub


Thanks,Idan
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
I suggest to connect in Debug Mode and place a Log statement at the very beginning of the ItemClick event to see if the event is actually being triggered and then work form there. with what you ave provided there is to little to give reliable advice.

Please also use code tags when posting code [ CODE]your code here.. [ /CODE] (remove space after opening bracket) to display code like this...

B4X:
Sub listviewMenu_Itemclick (Position As Int, Value As Object)

If (Position=0) Then
StartActivity(...)

Else If (Position=1) Then
Msgbox(...)

Else If (Position=2) Then
Msgbox(...)
Else
Msgbox (...)
End If

End Sub
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
@RandomCoder for your info you can use the [ Plain] [ /Plain] tags to display the "Please use the [ Code] tags message (all without spaces)

ie. @Idan Arad ... Please also use code tags when posting code [CODE]your code here.. [/CODE]
 
Upvote 0

Idan Arad

Member
Licensed User
Longtime User
I suggest to connect in Debug Mode and place a Log statement at the very beginning of the ItemClick event to see if the event is actually being triggered and then work form there. with what you ave provided there is to little to give reliable advice.


Tried debug mode...the event is not triggered until you click 10 to 15 times.
After that the event is triggered normally.
 
Upvote 0
Top