Android Question ListView_ItemClick needs many click to work

Discussion in 'Android Questions' started by Idan Arad, Jul 27, 2015.

  1. Idan Arad

    Idan Arad Member Licensed User

    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

    Else If (Position=1) Then

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

    End Sub

  2. RandomCoder

    RandomCoder Well-Known Member Licensed 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...

    Sub listviewMenu_Itemclick (Position As Int, Value As Object)

    If (Position=0Then

    Else If (Position=1Then

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

    End Sub
  3. mangojack

    mangojack Well-Known Member Licensed 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]
    DonManfred likes this.
  4. Idan Arad

    Idan Arad Member Licensed User

    Tried debug mode...the event is not triggered until you click 10 to 15 times.
    After that the event is triggered normally.
  5. Erel

    Erel Administrator Staff Member Licensed User

    As RandomCoder wrote it is better to test it with Log instead of Msgbox.
  6. Idan Arad

    Idan Arad Member Licensed User

    Thanks Erel
    I will try , but as far as I see the event is not triggered at all,so whatever inside the sub doesn't really matter.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice