Android Question Panel touch not working?

Discussion in 'Android Questions' started by Alberto Michelis, Jun 9, 2015.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Hi,
    I have a Panel with a view inside and I need to detect the "move the finger from right to left or viceversa.
    I tried that:

    Precios.Initialize(Me, "Precios")
    PanelPrecios.AddView(Precios.AsView, 0, 0, 100%x, PanelPrecios.Height)
    PanelPrecios.Visible=False
    PanelPrecios.Color=Colors.Black

    Sub PanelPrecios_Touch (Action As Int, X As Float, Y As Float)
    Msgbox(Action&" "&X&" "&Y,"")

    End Sub

    Sub Precios_Touch (Action As Int, X As Float, Y As Float)
    Msgbox(Action&" "&X&" "&Y,"")
    End Sub

    But nothig happend, no message at all.

    How can I do it?
    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    Use Log instead of Msgbox.

    What is the type of Precios? Why do we need to guess it...
     
  3. LucaMs

    LucaMs Expert Licensed User

    if PanelPrecios is not visible, it is not touchable.
    If it is visible but transparent you can intercept the event.
     
  4. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Hi,
    I have a Panel with a view inside and I need to detect the "move the finger from right to left or viceversa.
    I tried that:

    Code:
    Dim Precios As CustomListView
    Dim PanelPrecios As Panel

    Precios.Initialize(Me, 
    "Precios")
    PanelPrecios.AddView(Precios.AsView, 
    00100%x, PanelPrecios.Height)
    PanelPrecios.Color=
    Colors.Black

    Sub PanelPrecios_Touch (Action As Int, X As Float, Y As Float)
        
    Msgbox(Action&" "&X&" "&Y,"")
    End Sub

    Sub Precios_Touch (Action As Int, X As Float, Y As Float)
        
    Msgbox(Action&" "&X&" "&Y,"")
    End Sub
    Sory Erel I dont want you to guess nothing, I'm a beginer.

    Thanks
     
  5. Erel

    Erel Administrator Staff Member Licensed User

Loading...