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
  • #525
Closed
Open
Issue created Aug 12, 2015 by Administrator@rootContributor

Panel glitching and stopping in the middle every so often

Created by: PhpXp

Since I first tried this library I had a problem that every 1 in 50 times or so the panel glitched and got stuck in the middle even though I had no anchor point set.

Example: https://gfycat.com/SeparateInformalAmericanavocet

ignore the View animations it's just an example I think it happens when I try to expand the panel very quickly.

After some debugging I noticed the issue is in the ViewDragHelper:

public boolean continueSettling(boolean deferCallbacks) {
    // Make sure, there is a captured view
    if (mCapturedView == null) {
        return false;
    }
    if (mDragState == STATE_SETTLING) {
        boolean keepGoing = mScroller.computeScrollOffset();
        final int x = mScroller.getCurrX();
        final int y = mScroller.getCurrY();
        final int dx = x - mCapturedView.getLeft();
        final int dy = y - mCapturedView.getTop();

        if(!keepGoing && dy != 0) { //add this 5 lines
            //Invalid drag state
            mCapturedView.setTop(0);
            return true;
        }
        // ...

I don't know why it happens but everytime it does, keepGoing is false but dy is a very large negative number (around -600) instead of 0. The correct behaviour is that when y is getting close to 0, so should dy.

So adding those 5 lines fixes the glitching but it's really just a workaround.

I have Android 5.1.1 on an Z3 Compact, but the issue was already present in 5.0.2.

Does anyone else experience this glitch?

Assignee
Assign to
Time tracking