Android Question Controls under a panel

Discussion in 'Android Questions' started by Loris Anoardi, Aug 8, 2015.

  1. Loris Anoardi

    Loris Anoardi Member Licensed User

    In my activity, i load a normal layout (LAYOUT1) with buttons. Then i load a panel dinamically and some other controls inside it. My problem: If the user clicks in the black region of the panel, at the same position of a button of LAYOUT1, this button is still active, even if it's hidden by the panel!
    How can i solve? Thanks
  2. buras3

    buras3 Active Member Licensed User

    i don't know if it's the only way
    but just disable the buttons when you show panel2
  3. picenainformatica

    picenainformatica Active Member Licensed User

    You need to manage the panel click event.
    RandomCoder likes this.
  4. LucaMs

    LucaMs Expert Licensed User

  5. elitevenkat

    elitevenkat Active Member Licensed User

    create a dummy panel click event just the skeleton sub end sub without any code. your problem is solved.
  6. LucaMs

    LucaMs Expert Licensed User

    almost... you can hear the click sound, in that case.
    It is better to use the Touch event, with a "Return False" inside of it.
  7. LucaMs

    LucaMs Expert Licensed User

    Ops, ho visto adesso che la domanda è di un italiano, hehehe (che sonno!!!)
    Beh, puoi vedere il progetto che ho allegato al post che ti ho indicato in #4.

    I saw just now that the question is posted by an italian member.
    You can see the project I attached to the post I linked in #4
  8. Loris Anoardi

    Loris Anoardi Member Licensed User

    Ciao ho visto ora la tua risposta, grazie!
    Ho risolto inserendo nel secondo layout un bottone di grandezza 100%x x 100%y, disabilitato, e posto nel backgroud, dietro agli oggetti.
    Essendo una view riesce a coprire pienamente il layout1.

    Traduco per gli altri:
    i inserted a button in the layout2 with size 100%x and 100%y, disabled. This button is a view that cover at 100% the layout1.
  9. RandomCoder

    RandomCoder Well-Known Member Licensed User

    As mentioned in post number 3, adding a click event to the panel would also solve your problem.
    Loris Anoardi likes this.
  10. Loris Anoardi

    Loris Anoardi Member Licensed User

    You're right, it works correctly! Thanks to everyone.
  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