From 54ef00f721c9c3064a5d67a4642f582142e80d04 Mon Sep 17 00:00:00 2001 From: Noelia Alcala Date: Fri, 25 Nov 2022 16:44:15 +0000 Subject: [PATCH] ADS: Accessibility screen migration (#2553) Task/Issue URL: https://app.asana.com/0/0/1203418963160797/f ### Description Accessibility screen 100% migrated to new components ### Steps to test this PR - Install from this branch - Go to Settings > Accessibility - [ ] Check screen looks as expected ### UI changes | Before | After | | ------ | ----- | ![Screenshot_20221123-171045_DuckDuckGo](https://user-images.githubusercontent.com/20798495/203611688-2e940e30-79a6-46b6-b641-02c162f975a7.jpg)|![Screenshot_20221124-101518_DuckDuckGo](https://user-images.githubusercontent.com/20798495/203759185-7398bb92-b372-4182-bf36-266dde6f555c.jpg)| ![Screenshot_20221124-101542_DuckDuckGo](https://user-images.githubusercontent.com/20798495/203759120-a2230381-80c3-4648-a79b-e6d79f0a624d.jpg)|![Screenshot_20221124-101507_DuckDuckGo](https://user-images.githubusercontent.com/20798495/203759152-68b12852-8705-4c4b-9c6a-6930cefca7c1.jpg)| --- .../activity_accessibility_settings.xml | 150 ++++++++---------- .../background_text_view_container.xml | 21 +++ 2 files changed, 89 insertions(+), 82 deletions(-) create mode 100644 common-ui/src/main/res/drawable/background_text_view_container.xml diff --git a/app/src/main/res/layout/activity_accessibility_settings.xml b/app/src/main/res/layout/activity_accessibility_settings.xml index b025536e3616..2c153370df97 100644 --- a/app/src/main/res/layout/activity_accessibility_settings.xml +++ b/app/src/main/res/layout/activity_accessibility_settings.xml @@ -14,114 +14,100 @@ ~ limitations under the License. --> - + + android:id="@+id/includeToolbar" + layout="@layout/include_default_toolbar" /> + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + tools:ignore="Overdraw"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="@dimen/keyline_4"> + android:id="@+id/appFontSizeToggle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:primaryText="@string/accessibilityTextSizeOverrideTitle" + app:secondaryText="@string/accessibilityTextSizeOverrideSubtitle" + app:showSwitch="true" /> + android:id="@+id/fontSizeSettingsGroup" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + tools:ignore="Overdraw"> - + android:paddingEnd="@dimen/keyline_4"> - - - + android:layout_gravity="center" + android:minWidth="50dp" + app:typography="body1" /> + android:id="@+id/accessibilitySlider" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="@dimen/keyline_4" + android:paddingBottom="@dimen/keyline_4" + android:stepSize="10" + android:valueFrom="70" + android:valueTo="170" + app:labelBehavior="gone" + app:tickVisible="false" /> - + + android:layout_height="wrap_content" /> + android:id="@+id/forceZoomToggle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:primaryText="@string/accessibilityForceZoomTitle" + app:secondaryText="@string/accessibilityForceZoomSubtitle" + app:showSwitch="true" /> - \ No newline at end of file + \ No newline at end of file diff --git a/common-ui/src/main/res/drawable/background_text_view_container.xml b/common-ui/src/main/res/drawable/background_text_view_container.xml new file mode 100644 index 000000000000..accb8406b0c9 --- /dev/null +++ b/common-ui/src/main/res/drawable/background_text_view_container.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file