Add a done button to vision setting pages in setup flow

Root cause: User feels confused because the particular screen doesn't have a back button but at that moment of the setup flow the regular UI gestures didn't even work.
Solution: Add a done button to the vision settings pages for clearer navigation. This change combines parts of commit 5e931b2c23 and commit dd2ec775c8.

Bug: 262995569
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FragmentForSetupWizardTest
Change-Id: Id3a0d78389e0e6c11b5b5cf016b37673fde7f286
Merged-In: Id3a0d78389e0e6c11b5b5cf016b37673fde7f286
(cherry picked from commit dd2ec775c8)
This commit is contained in:
menghanli
2023-02-13 17:18:40 +08:00
parent 3773ae0d9f
commit 991b70c720
13 changed files with 782 additions and 42 deletions

View File

@@ -32,6 +32,7 @@ import com.android.settingslib.widget.LayoutPreference;
* The controller of the reset button in the text and reading options page.
*/
class TextReadingResetController extends BasePreferenceController {
private boolean mIsVisible;
private final View.OnClickListener mOnResetClickListener;
@EntryPoint
@@ -65,6 +66,12 @@ class TextReadingResetController extends BasePreferenceController {
AccessibilityStatsLogUtils.convertToEntryPoint(mEntryPoint));
}
});
setVisible(screen, getPreferenceKey(), mIsVisible);
}
void setVisible(boolean isVisible) {
mIsVisible = isVisible;
}
/**