Refine the UI of the text reading page across SuW.

Actions:
1) Customize pages and use the components from SuW lib to align SuW consistent style.
2) Add the done button in the Anything Else page.

Bug: 232771631
Bug: 222419452
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingResetControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreferenceFragmentForSetupWizardTest
Change-Id: Ie3f3513ceee7c40d6286335dce91979df0d27f02
This commit is contained in:
Peter Liang
2022-12-11 12:04:58 +08:00
parent 2c2a826c3f
commit 5e931b2c23
7 changed files with 92 additions and 82 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.accessibility;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
@@ -70,4 +72,20 @@ public class TextReadingResetControllerTest {
verify(mResetPreference).setOnResetClickListener(any(View.OnClickListener.class));
}
@Test
public void setVisibleAsFalse_preferenceInvisible() {
mResetController.setVisible(false);
mResetController.displayPreference(mPreferenceScreen);
assertThat(mResetPreference.isVisible()).isFalse();
}
@Test
public void setVisibleAsTrue_preferenceVisible() {
mResetController.setVisible(true);
mResetController.displayPreference(mPreferenceScreen);
assertThat(mResetPreference.isVisible()).isTrue();
}
}