Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A AndroidSlidingUpPanel
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 267
    • Issues 267
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Umano: News Read To You
  • AndroidSlidingUpPanel
  • Issues
  • #552
Closed
Open
Issue created Oct 09, 2015 by Administrator@rootContributor

ScrollableView makes scrollable views under main layout unresponsive.

Created by: RlagoMan

In my project, I have a WebView in the main content and a ListView in the sliding up panel. The ListView is set as scrollableView in the SlidingUpPanelLayout. When I hide the sliding up panel, the WebView stops responding to scroll events in every point of the screen greater than the sliding up panel height. I solved this with a single check in the dispatchTouchEvent() method:

...
            if (!isViewUnder(mScrollableView, (int) mInitialMotionX, (int) mInitialMotionY)) {
                 return super.dispatchTouchEvent(ev);
             }            

            // Prevent the slidingUpPanel to block events when is hidden or collapsed.
            // This causes errors on scrollable views under main content.
            if(PanelState.COLLAPSED.equals(getPanelState()) || PanelState.HIDDEN.equals(getPanelState())) {
                return super.dispatchTouchEvent(ev);
            }

             // Which direction (up or down) is the drag moving?
             if (dy * (mIsSlidingUp ? 1 : -1) > 0) { 
...

I have created a fork: https://github.com/RlagoMan/AndroidSlidingUpPanel

Hope this helps!

Assignee
Assign to
Time tracking