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

Commit 3a5e6199 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make gesture nav tutorial skip button always visible." into sc-v2-dev am: d84aaad1

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15960473

Change-Id: I6da155c5df23f3636ec3e6d790908a498f02e06b
parents c9845ed7 d84aaad1
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -274,7 +274,6 @@ abstract class TutorialController implements BackGestureAttemptCallback,
                mFeedbackView.findViewById(R.id.gesture_tutorial_fragment_feedback_subtitle);
        subtitle.setText(subtitleResId);
        if (isGestureSuccessful) {
            hideCloseButton();
            if (mTutorialFragment.isAtFinalStep()) {
                showActionButton();
            }
@@ -402,6 +401,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
    void transitToController() {
        hideFeedback();
        hideActionButton();
        updateCloseButton();
        updateSubtext();
        updateDrawables();
        updateLayout();
@@ -412,26 +412,21 @@ abstract class TutorialController implements BackGestureAttemptCallback,
        }
    }

    void hideCloseButton() {
        mCloseButton.setVisibility(GONE);
    }

    void showCloseButton() {
        mCloseButton.setVisibility(View.VISIBLE);
    void updateCloseButton() {
        mCloseButton.setTextAppearance(Utilities.isDarkTheme(mContext)
                ? R.style.TextAppearance_GestureTutorial_Feedback_Subtext
                : R.style.TextAppearance_GestureTutorial_Feedback_Subtext_Dark);
    }

    void hideActionButton() {
        showCloseButton();
        mCloseButton.setVisibility(View.VISIBLE);
        // Invisible to maintain the layout.
        mActionButton.setVisibility(View.INVISIBLE);
        mActionButton.setOnClickListener(null);
    }

    void showActionButton() {
        hideCloseButton();
        mCloseButton.setVisibility(GONE);
        mActionButton.setVisibility(View.VISIBLE);
        mActionButton.setOnClickListener(this::onActionButtonClicked);
    }