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

Commit d84aaad1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

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


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

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


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


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