Android Question CustomListView - 2 Directional Scrolling

Discussion in 'Android Questions' started by DawningTruth, Feb 22, 2019.

  1. DawningTruth

    DawningTruth Active Member Licensed User

    I have a CustomListView that scrolls horizontally. I then have an element in each panel which scrolls vertically.

    If I try to scroll vertically it tends to scroll left to right and gets stuck scrolling vertically.

    I noticed if I scroll super straight, I can get it to scroll vertically.

    This tells me that the cause of the problem is the scroll detection for the X axis is interfering with the scroll detection for the Y Axis.

    I have setup my CustomerListView so that it only scrolls horizontally once a certain scroll offset threshold is reached.

    So what I want to do is disable X scroll detection unless it is above this threshold. That way only the Y scrolling will be detected and the interference will be resolved.

    Any suggestions on how I can go about doing this?
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is problematic to combine two scrollable views. You should consider building a different layout. Maybe with a dialog with a list instead of the second list.
    DawningTruth likes this.
  3. DawningTruth

    DawningTruth Active Member Licensed User

    Thx Erel,

    I have been thinking the same thing. I see that the scrollview reacts to the movement of the scroll, which has already taken place by the time it is handled. Which creates the moving screen problem. Let me investigate your suggested option.
  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