Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 798c4b98 authored by Jim Miller's avatar Jim Miller Committed by Android Git Automerger
Browse files

am 3a8a2818: am d8a3a895: Fix 2404771: Expose reset() in SlidingTab widget so...

am 3a8a2818: am d8a3a895: Fix 2404771: Expose reset() in SlidingTab widget so we can reset it when we get an incoming call.

Merge commit '3a8a2818'

* commit '3a8a2818':
  Fix 2404771: Expose reset() in SlidingTab widget so we can reset it when we get an incoming call.
parents dfe4ec0e 3a8a2818
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -545,12 +545,22 @@ public class SlidingTab extends ViewGroup {
        return true;
    }

    /**
     * Reset the tabs to their original state and stop any existing animation.
     * Animate them back into place if animate is true.
     *
     * @param animate
     */
    public void reset(boolean animate) {
        mLeftSlider.reset(animate);
        mRightSlider.reset(animate);
    }

    @Override
    public void setVisibility(int visibility) {
        // Clear animations so sliders don't continue to animate when we show the widget again.
        if (visibility != getVisibility() && visibility == View.INVISIBLE) {
            mLeftSlider.reset(false);
            mRightSlider.reset(false);
           reset(false);
        }
        super.setVisibility(visibility);
    }