Android Question [B4X] [XUI] SD XUIScrollView2D is flickering

Discussion in 'Android Questions' started by klaus, Jun 6, 2019.

  1. klaus

    klaus Expert Licensed User

    I just tested the XUIScrollview2D library.
    I noticed that the movement of the table is flickering when scrolling insides the table, with the finger in B4A or the mouse cursor in B4J.
     
  2. Star-Dust

    Star-Dust Expert Licensed User

    Thanks for the reporting . I will try correct it
     
    Last edited: Jun 6, 2019
  3. Star-Dust

    Star-Dust Expert Licensed User

  4. klaus

    klaus Expert Licensed User

    I will do it tomorrow, I am leaving right now.
     
  5. klaus

    klaus Expert Licensed User

    It is still flickering in B4A especially when you move the finger slowly.
    In B4J it doesn't flicker anymore but the displacement of the panel is smaller than the displacement of the mouse cursor, this happens also in B4A.
     
  6. Star-Dust

    Star-Dust Expert Licensed User

    Could you observe if the movements were of the right speed in the previous version?
     
  7. klaus

    klaus Expert Licensed User

    The behaviour is the same in both versions.
     
  8. Star-Dust

    Star-Dust Expert Licensed User

    The thing is more complicated here than you thought because of the use of the XUI library. And anyway it's not clear why he sends coordinates even if you don't move your finger.

    I'll tell you in the coming days
     
  9. Star-Dust

    Star-Dust Expert Licensed User

  10. klaus

    klaus Expert Licensed User

    Sorry, but still the same.
    Attached a small video, unzip it to an mp4 file.
     

    Attached Files:

    Johan Hormaza and Star-Dust like this.
  11. klaus

    klaus Expert Licensed User

    The flickering of the scrolling in your project comes from the fact that you use the Touch event of the internal panel PanelLocal_Touch and not the parent panel mBasePanel_Touch.
    The PanelLocal.Left and PanelLocal.Top properties are changed during scrolling producing the flickering.

    I have begun to write my own, see here.
     
  12. Star-Dust

    Star-Dust Expert Licensed User

    I'm sorry, but I couldn't work on it, I took a few days off because of illness.

    Thanks for the suggestion, I'll try in the coming days.
     
    Peter Simpson, Erel and Johan Hormaza like this.
  13. klaus

    klaus Expert Licensed User

    Don't worry!
    I wish you a quick recovery.
     
    Johan Hormaza likes this.
  14. Star-Dust

    Star-Dust Expert Licensed User

  15. klaus

    klaus Expert Licensed User

    Thank you.
    I had seen it yesterday evening and put it on my to do list for today.
    The flickering is no more present !

    There is a problem with scrolling with the finger.
    When we add views with events like a table with labels onto the scrollview, this one doesn't scroll anymore with the finger.
    The only possibility is with the scrollbars.

    A suggestion for the scrollbars.
    Make the bar scrolling only when the user touches the cursor.
    And when the user clicks on the scrollbar outsides the cursor scroll 1 page, like in windows.
     
    Peter Simpson and Johan Hormaza like this.
  16. Star-Dust

    Star-Dust Expert Licensed User

    This is because the views above the panel absorb the touch event.
    I excluded the possibility of addi a transparent panel over the views would allow a constant scrolling but would cancel the events of the other views.

    In the first version it was actually like that, then for a reason I don't remember I modified it.
    I will try to do it again.

    Thank you for your suggestion
     
    Peter Simpson likes this.
  17. klaus

    klaus Expert Licensed User

    I know, but for me this is a problem because phone and tablet users would want it.
    I have not yet looked if there is a possibility to send the event to the underlying view in Android.
    In B4J it works in my scrollview.
    And, if I remember well, in B4i it's also the case.
     
    Last edited: Jun 14, 2019
  18. Star-Dust

    Star-Dust Expert Licensed User

    If you think it is useful I can create the possibility to enable a panel above for scrolling but which cancels the events of the underlying objects.
    I can always make an option to enable or disable it.
     
  19. klaus

    klaus Expert Licensed User

    I know these possibilities, but for me these are workarounds and not what I am 'dreaming' of.
     
    Star-Dust likes this.
  20. Erel

    Erel Administrator Staff Member Licensed User

    Check B4XDrawer code for the best approach to handle such cases. It is more complicated but the result is that the user can both interact with the visible controls and can scroll the underlying control.
    It is relevant for B4A and B4i.
     
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