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

Commit e8893b91 authored by Maurice Chu's avatar Maurice Chu Committed by Android (Google) Code Review
Browse files

Merge "Fragment carousel always starts on About page" into jb-dev

parents b4a0b320 0b398b3d
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -173,6 +173,16 @@ public class ContactDetailFragmentCarousel extends HorizontalScrollView implemen
        }
        }
    }
    }


    /**
     * Reset the fragment carousel to show the about page.
     */
    public void reset() {
        if (mCurrentPage != ABOUT_PAGE) {
            mCurrentPage = ABOUT_PAGE;
            snapToEdge();
        }
    }

    public int getCurrentPage() {
    public int getCurrentPage() {
        return mCurrentPage;
        return mCurrentPage;
    }
    }
+3 −0
Original line number Original line Diff line number Diff line
@@ -405,6 +405,9 @@ public class ContactDetailLayoutController {
            case LayoutMode.TWO_COLUMN_FRAGMENT_CAROUSEL: {
            case LayoutMode.TWO_COLUMN_FRAGMENT_CAROUSEL: {
                // Allow swiping between all fragments
                // Allow swiping between all fragments
                mFragmentCarousel.enableSwipe(true);
                mFragmentCarousel.enableSwipe(true);
                if (isDifferentContact) {
                    mFragmentCarousel.reset();
                }
                if (!isDifferentContact && animateStateChange) {
                if (!isDifferentContact && animateStateChange) {
                    mFragmentCarousel.animateAppear();
                    mFragmentCarousel.animateAppear();
                }
                }