Merge "Make gesture nav tutorial skip button always visible." into sc-v2-dev am: d84aaad11f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15960473 Change-Id: I6da155c5df23f3636ec3e6d790908a498f02e06b
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user