1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

iOS Question Click Stealer AutocompleteView

Discussion in 'iOS Questions' started by Tomas Petrus, Apr 9, 2019.

  1. Tomas Petrus

    Tomas Petrus Active Member Licensed User

    Hi guys,
    I am transforming my app from Android to iOS
    Aiming to both of the apps to look as same as posible.

    To achieve that I need to use autocomplete inside other panel
    but some other click events are then stealing my clicks so I cant select anything from the suggested list because the click is stolen by Click event on the parent panel or on the page...

    You can see it in example
     
  2. Tomas Petrus

    Tomas Petrus Active Member Licensed User

    and the code
     

    Attached Files:

  3. Tomas Petrus

    Tomas Petrus Active Member Licensed User

    Now if you try to select anything from the list.
    Your click is stealed by ClickThief and the event is loged : )
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I see it too. This is related to TableView behavior where it doesn't immediately treat the touch gesture as a selection. When that happens the panel underneath it "steals" the event and consumes it.
     
  5. Tomas Petrus

    Tomas Petrus Active Member Licensed User

    and is there any workaround ?
    Or do I need to redesign ?
    Like do it as a separate page so I will eliminate the click thieves ?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    What is the use case for handling the click event of the underneath panel?

    Switch to xCustomListView in both your B4A and B4i projects. You will be able to share more code between the platforms.
    (I'm not 100% sure that this issue with the underlying touch listener will not affect CLV. You need to test it.)
     
    Last edited: Apr 9, 2019
  7. Tomas Petrus

    Tomas Petrus Active Member Licensed User

    In the real app the underneath panel is just semitransparent gray background visible around the main panel. Under which u still see the form, from which the autocomplete was opened. So when u click outside the main panel with autocomplete the panel hides and u are back where u were : )

    Ok note taken, will try to use it in future updates.
    Right now I solved it by disabling the clickThief event and adding cancel button into the PlacesAutocompleteView Class.
    Not ideal but its timesaver : )
     
Loading...
  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