summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSetup Wizard Team <android-setup-team-eng@google.com>2022-01-17 13:51:44 +0800
committerPasty Chang <pastychang@google.com>2022-01-19 02:29:42 +0000
commit02adcda3c69c4bab7aecb5ff21ebba7e59e6ed2c (patch)
tree6ae7d0545d5ca4605b4f771b915c221710044ea7
parentd79322aa38ffa9782651cb3383e9a482d59b4c4a (diff)
downloadsetupdesign-02adcda3c69c4bab7aecb5ff21ebba7e59e6ed2c.tar.gz
Import updated Android Setupdesign Library 422272789
Copied from google3/third_party/java_src/android_libs/setupdesign Test: mm Included changes: - 422272789 Fixed the wrong attribute for default footer bar padding ... - 421746593 [SetupDesign] Support EditBox dynamic color for new dynam... - 421699365 [Transition] Migrates interpolator config file from anim-... - 421586845 Add List Item Material Next Style. - 421573482 Fix the Edit box theme. - 421555926 [SetupDesing] Prepare the new DynamicColor theme without ... - 421548320 [SetupDesing] Fix the loading circle too large issue - 421491041 Fix alert dialog title text size to match GM3 guideline. - 421479952 Add edit box theme. - 421459352 Add attribute of list item divider shown. - 421431651 Automated g4 rollback of changelist 417941860. - 420060995 [SetupCompat] Add helper to read the MY style flag from s... - 419874242 Migrate android.support.annotation. to androidx.annotation. - 418572016 [SetupDesign] Add GlifV4 theme - 417941860 Automated g4 rollback of changelist 416459854. - 416459854 [Tablet] Set default top margin value into setupdesign li... Bug:213303604 PiperOrigin-RevId: 422272789 Change-Id: Idad4c466281927679f3e27449e92105623bcbe41
-rw-r--r--lottie_loading_layout/res/layout-land-v31/sud_glif_loading_template_content.xml6
-rw-r--r--lottie_loading_layout/res/layout-sw600dp-land-v31/sud_glif_fullscreen_loading_template_content.xml8
-rw-r--r--lottie_loading_layout/res/layout-v31/sud_loading_illustration_layout.xml33
-rw-r--r--main/res/anim-ldrtl-v31/sud_slide_back_in.xml2
-rw-r--r--main/res/anim-ldrtl-v31/sud_slide_back_out.xml2
-rw-r--r--main/res/anim-ldrtl-v31/sud_slide_next_in.xml2
-rw-r--r--main/res/anim-ldrtl-v31/sud_slide_next_out.xml2
-rw-r--r--main/res/anim-v31/sud_slide_back_in.xml2
-rw-r--r--main/res/anim-v31/sud_slide_back_out.xml2
-rw-r--r--main/res/anim-v31/sud_slide_next_in.xml2
-rw-r--r--main/res/anim-v31/sud_slide_next_out.xml2
-rw-r--r--main/res/interpolator-v31/sud_interpolator.xml (renamed from main/res/anim-ldrtl-v31/sud_interpolator.xml)0
-rw-r--r--main/res/layout-land-v31/sud_glif_blank_template_content.xml6
-rw-r--r--main/res/layout-land-v31/sud_glif_list_template_content.xml6
-rw-r--r--main/res/layout-land-v31/sud_glif_preference_template_content.xml6
-rw-r--r--main/res/layout-land-v31/sud_glif_recycler_template_content.xml6
-rw-r--r--main/res/layout-land-v31/sud_glif_template_content.xml6
-rw-r--r--main/res/layout/sud_items_default.xml10
-rw-r--r--main/res/values-land-v31/dimens.xml7
-rw-r--r--main/res/values-night/styles.xml5
-rw-r--r--main/res/values-sw600dp-land-v31/dimens.xml36
-rw-r--r--main/res/values-sw600dp-v31/dimens.xml42
-rw-r--r--main/res/values-sw800dp/dimens.xml (renamed from main/res/anim-v31/sud_interpolator.xml)12
-rw-r--r--main/res/values-v31/styles.xml95
-rw-r--r--main/res/values/attrs.xml9
-rw-r--r--main/res/values/dimens.xml11
-rw-r--r--main/res/values/styles.xml123
-rw-r--r--main/src/com/google/android/setupdesign/items/Item.java7
-rw-r--r--main/src/com/google/android/setupdesign/template/ListMixin.java18
-rw-r--r--main/src/com/google/android/setupdesign/util/ThemeHelper.java11
-rw-r--r--main/src/com/google/android/setupdesign/util/ThemeResolver.java10
-rw-r--r--main/src/com/google/android/setupdesign/view/IconUniformityAppImageView.java2
32 files changed, 413 insertions, 78 deletions
diff --git a/lottie_loading_layout/res/layout-land-v31/sud_glif_loading_template_content.xml b/lottie_loading_layout/res/layout-land-v31/sud_glif_loading_template_content.xml
index 65e20a9..4473c52 100644
--- a/lottie_loading_layout/res/layout-land-v31/sud_glif_loading_template_content.xml
+++ b/lottie_loading_layout/res/layout-land-v31/sud_glif_loading_template_content.xml
@@ -56,9 +56,9 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
+ style="@style/SudLandContentContianerStyle"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
+ android:focusedByDefault="false"
android:orientation="vertical">
<FrameLayout
diff --git a/lottie_loading_layout/res/layout-sw600dp-land-v31/sud_glif_fullscreen_loading_template_content.xml b/lottie_loading_layout/res/layout-sw600dp-land-v31/sud_glif_fullscreen_loading_template_content.xml
index df88e0b..e5e1bb5 100644
--- a/lottie_loading_layout/res/layout-sw600dp-land-v31/sud_glif_fullscreen_loading_template_content.xml
+++ b/lottie_loading_layout/res/layout-sw600dp-land-v31/sud_glif_fullscreen_loading_template_content.xml
@@ -64,9 +64,9 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
+ style="@style/SudLandContentContianerStyle"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
+ android:focusedByDefault="false"
android:orientation="vertical">
<FrameLayout
@@ -100,4 +100,4 @@
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</FrameLayout>
diff --git a/lottie_loading_layout/res/layout-v31/sud_loading_illustration_layout.xml b/lottie_loading_layout/res/layout-v31/sud_loading_illustration_layout.xml
index 0f60d02..8873b42 100644
--- a/lottie_loading_layout/res/layout-v31/sud_loading_illustration_layout.xml
+++ b/lottie_loading_layout/res/layout-v31/sud_loading_illustration_layout.xml
@@ -22,18 +22,29 @@
android:layout_height="match_parent"
android:orientation="vertical">
- <ProgressBar
- android:id="@+id/sud_progress_bar"
- android:visibility="gone"
- style="@style/SudFourColorIndeterminateProgressBar"
+ <com.google.android.setupdesign.view.FillContentLayout
+ android:orientation="vertical"
+ android:paddingTop="0dp"
+ android:paddingBottom="0dp"
+ android:paddingStart="0dp"
+ android:paddingEnd="0dp"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent">
- <com.google.android.setupdesign.view.IllustrationVideoView
- android:id="@+id/sud_progress_illustration"
- android:visibility="gone"
- style="@style/SudContentIllustration"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ <ProgressBar
+ android:id="@+id/sud_progress_bar"
+ android:visibility="gone"
+ style="@style/SudFourColorIndeterminateProgressBar"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <com.google.android.setupdesign.view.IllustrationVideoView
+ android:id="@+id/sud_progress_illustration"
+ android:visibility="gone"
+ style="@style/SudContentIllustration"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ </com.google.android.setupdesign.view.FillContentLayout>
</LinearLayout> \ No newline at end of file
diff --git a/main/res/anim-ldrtl-v31/sud_slide_back_in.xml b/main/res/anim-ldrtl-v31/sud_slide_back_in.xml
index 006d9b4..0f9bba9 100644
--- a/main/res/anim-ldrtl-v31/sud_slide_back_in.xml
+++ b/main/res/anim-ldrtl-v31/sud_slide_back_in.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="100%"
android:toXDelta="0%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-ldrtl-v31/sud_slide_back_out.xml b/main/res/anim-ldrtl-v31/sud_slide_back_out.xml
index 341bbad..8c5c439 100644
--- a/main/res/anim-ldrtl-v31/sud_slide_back_out.xml
+++ b/main/res/anim-ldrtl-v31/sud_slide_back_out.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="0%"
android:toXDelta="-100%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-ldrtl-v31/sud_slide_next_in.xml b/main/res/anim-ldrtl-v31/sud_slide_next_in.xml
index 77d4cd5..cf524a3 100644
--- a/main/res/anim-ldrtl-v31/sud_slide_next_in.xml
+++ b/main/res/anim-ldrtl-v31/sud_slide_next_in.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="-100%"
android:toXDelta="0%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-ldrtl-v31/sud_slide_next_out.xml b/main/res/anim-ldrtl-v31/sud_slide_next_out.xml
index 8ae16d4..18b760e 100644
--- a/main/res/anim-ldrtl-v31/sud_slide_next_out.xml
+++ b/main/res/anim-ldrtl-v31/sud_slide_next_out.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="0%"
android:toXDelta="100%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-v31/sud_slide_back_in.xml b/main/res/anim-v31/sud_slide_back_in.xml
index 77d4cd5..cf524a3 100644
--- a/main/res/anim-v31/sud_slide_back_in.xml
+++ b/main/res/anim-v31/sud_slide_back_in.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="-100%"
android:toXDelta="0%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-v31/sud_slide_back_out.xml b/main/res/anim-v31/sud_slide_back_out.xml
index 8ae16d4..18b760e 100644
--- a/main/res/anim-v31/sud_slide_back_out.xml
+++ b/main/res/anim-v31/sud_slide_back_out.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="0%"
android:toXDelta="100%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-v31/sud_slide_next_in.xml b/main/res/anim-v31/sud_slide_next_in.xml
index 006d9b4..0f9bba9 100644
--- a/main/res/anim-v31/sud_slide_next_in.xml
+++ b/main/res/anim-v31/sud_slide_next_in.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="100%"
android:toXDelta="0%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-v31/sud_slide_next_out.xml b/main/res/anim-v31/sud_slide_next_out.xml
index 341bbad..8c5c439 100644
--- a/main/res/anim-v31/sud_slide_next_out.xml
+++ b/main/res/anim-v31/sud_slide_next_out.xml
@@ -19,4 +19,4 @@
android:duration="@integer/sudTransitionDuration"
android:fromXDelta="0%"
android:toXDelta="-100%"
- android:interpolator="@anim/sud_interpolator" />
+ android:interpolator="@interpolator/sud_interpolator" />
diff --git a/main/res/anim-ldrtl-v31/sud_interpolator.xml b/main/res/interpolator-v31/sud_interpolator.xml
index bec77f0..bec77f0 100644
--- a/main/res/anim-ldrtl-v31/sud_interpolator.xml
+++ b/main/res/interpolator-v31/sud_interpolator.xml
diff --git a/main/res/layout-land-v31/sud_glif_blank_template_content.xml b/main/res/layout-land-v31/sud_glif_blank_template_content.xml
index fd7cbd2..aeef4a3 100644
--- a/main/res/layout-land-v31/sud_glif_blank_template_content.xml
+++ b/main/res/layout-land-v31/sud_glif_blank_template_content.xml
@@ -44,10 +44,8 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
- android:focusedByDefault="true"
+ style="@style/SudLandContentContianerStyle"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
android:orientation="vertical">
<FrameLayout
diff --git a/main/res/layout-land-v31/sud_glif_list_template_content.xml b/main/res/layout-land-v31/sud_glif_list_template_content.xml
index f7a353b..9b0dd5d 100644
--- a/main/res/layout-land-v31/sud_glif_list_template_content.xml
+++ b/main/res/layout-land-v31/sud_glif_list_template_content.xml
@@ -55,10 +55,8 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
- android:focusedByDefault="true"
+ style="@style/SudLandContentContianerStyle"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
android:orientation="vertical">
<com.google.android.setupdesign.view.StickyHeaderListView
diff --git a/main/res/layout-land-v31/sud_glif_preference_template_content.xml b/main/res/layout-land-v31/sud_glif_preference_template_content.xml
index fcb9ff6..1d95b42 100644
--- a/main/res/layout-land-v31/sud_glif_preference_template_content.xml
+++ b/main/res/layout-land-v31/sud_glif_preference_template_content.xml
@@ -55,10 +55,8 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
- android:focusedByDefault="true"
+ style="@style/SudLandContentContianerStyle"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
android:orientation="vertical">
<FrameLayout
diff --git a/main/res/layout-land-v31/sud_glif_recycler_template_content.xml b/main/res/layout-land-v31/sud_glif_recycler_template_content.xml
index 4bd56ea..a75c068 100644
--- a/main/res/layout-land-v31/sud_glif_recycler_template_content.xml
+++ b/main/res/layout-land-v31/sud_glif_recycler_template_content.xml
@@ -56,10 +56,8 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
- android:focusedByDefault="true"
+ style="@style/SudLandContentContianerStyle"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
android:orientation="vertical">
<com.google.android.setupdesign.view.HeaderRecyclerView
diff --git a/main/res/layout-land-v31/sud_glif_template_content.xml b/main/res/layout-land-v31/sud_glif_template_content.xml
index 1e8f9a0..6329e4b 100644
--- a/main/res/layout-land-v31/sud_glif_template_content.xml
+++ b/main/res/layout-land-v31/sud_glif_template_content.xml
@@ -55,10 +55,7 @@
<LinearLayout
android:id="@+id/sud_landscape_content_area"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="@dimen/sud_glif_land_content_area_weight"
- android:focusedByDefault="true"
+ style="@style/SudLandContentContianerStyle"
android:orientation="vertical">
<com.google.android.setupdesign.view.BottomScrollView
@@ -76,6 +73,7 @@
<FrameLayout
android:id="@+id/sud_layout_content"
+ android:paddingTop="?attr/sudGlifContentPaddingTop"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
diff --git a/main/res/layout/sud_items_default.xml b/main/res/layout/sud_items_default.xml
index 4f3f3ac..11f89fa 100644
--- a/main/res/layout/sud_items_default.xml
+++ b/main/res/layout/sud_items_default.xml
@@ -17,7 +17,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- style="@style/SudItemContainer"
+ style="?attr/sudItemContainerStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
@@ -25,7 +25,7 @@
<FrameLayout
android:id="@+id/sud_items_icon_container"
- android:layout_width="@dimen/sud_items_icon_container_width"
+ style="?attr/sudItemIconContainerStyle"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start">
@@ -42,12 +42,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="vertical">
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/sud_items_title"
- style="@style/SudItemTitle"
+ style="?attr/sudItemTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
@@ -56,10 +57,9 @@
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/sud_items_summary"
- style="@style/SudItemSummary"
+ style="?attr/sudItemSummaryStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/sud_items_padding_bottom_extra"
android:gravity="start"
android:textAlignment="viewStart"
android:visibility="gone"
diff --git a/main/res/values-land-v31/dimens.xml b/main/res/values-land-v31/dimens.xml
index 8b8d10d..aa9358f 100644
--- a/main/res/values-land-v31/dimens.xml
+++ b/main/res/values-land-v31/dimens.xml
@@ -24,4 +24,11 @@
<dimen name="sud_glif_margin_start">32dp</dimen>
<dimen name="sud_glif_margin_end">32dp</dimen>
+ <dimen name="sud_glif_header_title_margin_top">24dp</dimen>
+ <dimen name="sud_glif_header_title_margin_bottom">0dp</dimen>
+ <dimen name="sud_glif_description_margin_top">8dp</dimen>
+ <dimen name="sud_glif_icon_margin_top">32dp</dimen>
+ <dimen name="sud_glif_footer_min_height">52dp</dimen>
+ <dimen name="sud_glif_content_padding_top">32dp</dimen>
+
</resources>
diff --git a/main/res/values-night/styles.xml b/main/res/values-night/styles.xml
index d609b4c..555473e 100644
--- a/main/res/values-night/styles.xml
+++ b/main/res/values-night/styles.xml
@@ -22,7 +22,12 @@
<style name="SudThemeGlif.DayNight" parent="SudThemeGlif" />
<style name="SudThemeGlifV2.DayNight" parent="SudThemeGlifV2" />
<style name="SudThemeGlifV3.DayNight" parent="SudThemeGlifV3" />
+ <style name="SudThemeGlifV4.DayNight" parent="SudThemeGlifV4" />
+
+ <!-- DynamicColor DayNight themes -->
<style name="SudDynamicColorThemeGlifV3.DayNight" parent="SudDynamicColorThemeGlifV3" />
<style name="SudFullDynamicColorThemeGlifV3.DayNight" parent="SudFullDynamicColorThemeGlifV3" />
+ <style name="SudDynamicColorTheme.DayNight" parent="SudDynamicColorTheme" />
+ <style name="SudFullDynamicColorTheme.DayNight" parent="SudFullDynamicColorTheme" />
</resources>
diff --git a/main/res/values-sw600dp-land-v31/dimens.xml b/main/res/values-sw600dp-land-v31/dimens.xml
new file mode 100644
index 0000000..ed4486c
--- /dev/null
+++ b/main/res/values-sw600dp-land-v31/dimens.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2021 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+
+ <!-- General -->
+ <!-- Calculated by (sud_glif_margin_start - 4dp internal padding of button) -->
+ <dimen name="sud_glif_button_margin_end">44dp</dimen>
+ <!-- Calculated by (sud_glif_margin_start - sud_glif_button_padding) -->
+ <dimen name="sud_glif_button_margin_start">32dp</dimen>
+ <!-- Calculated by (sud_glif_margin_start - sud_glif_button_padding) -->
+ <dimen name="sud_glif_footer_padding_start">32dp</dimen>
+ <!-- Calculated by (sud_glif_margin_end - 4dp internal padding of button) -->
+ <dimen name="sud_glif_footer_padding_end">44dp</dimen>
+ <dimen name="sud_glif_margin_start">48dp</dimen>
+ <dimen name="sud_glif_margin_end">48dp</dimen>
+
+ <dimen name="sud_glif_content_padding_top">88dp</dimen>
+ <dimen name="sud_items_glif_icon_divider_inset">96dp</dimen>
+ <dimen name="sud_items_glif_text_divider_inset">48dp</dimen>
+
+</resources>
diff --git a/main/res/values-sw600dp-v31/dimens.xml b/main/res/values-sw600dp-v31/dimens.xml
new file mode 100644
index 0000000..f3f3aba
--- /dev/null
+++ b/main/res/values-sw600dp-v31/dimens.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2021 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+
+ <!-- General -->
+ <!-- Calculated by (sud_glif_margin_start - 4dp internal padding of button) -->
+ <dimen name="sud_glif_button_margin_end">60dp</dimen>
+ <!-- Calculated by (sud_glif_margin_start - sud_glif_button_padding) -->
+ <dimen name="sud_glif_button_margin_start">48dp</dimen>
+ <!-- Calculated by (sud_glif_margin_start - sud_glif_button_padding) -->
+ <dimen name="sud_glif_footer_padding_start">48dp</dimen>
+ <!-- Calculated by (sud_glif_margin_end - 4dp internal padding of button) -->
+ <dimen name="sud_glif_footer_padding_end">60dp</dimen>
+ <!-- Default margin start/end should be 96dp in portrait mode for the large screen. However, If
+ you set this value, you can no longer overwrite a smaller value from partner config. So
+ here is set to 64dp and rewritten to 96dp through partner config. -->
+ <dimen name="sud_glif_margin_start">64dp</dimen>
+ <dimen name="sud_glif_margin_end">64dp</dimen>
+
+ <dimen name="sud_glif_footer_min_height">72dp</dimen>
+ <dimen name="sud_glif_content_padding_top">0dp</dimen>
+
+ <dimen name="sud_header_title_size">24sp</dimen>
+ <dimen name="sud_items_glif_icon_divider_inset">112dp</dimen>
+ <dimen name="sud_items_glif_text_divider_inset">64dp</dimen>
+
+</resources>
diff --git a/main/res/anim-v31/sud_interpolator.xml b/main/res/values-sw800dp/dimens.xml
index bec77f0..163e342 100644
--- a/main/res/anim-v31/sud_interpolator.xml
+++ b/main/res/values-sw800dp/dimens.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2021 The Android Open Source Project
+ Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,5 +15,9 @@
limitations under the License.
-->
-<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
- android:pathData="M 0,0 C 0.05, 0, 0.133333, 0.06, 0.166666, 0.4 C 0.208333, 0.82, 0.25, 1, 1, 1" />
+<resources xmlns:tools="http://schemas.android.com/tools">
+
+ <dimen name="sud_content_illustration_max_height">468dp</dimen>
+ <dimen name="sud_content_illustration_max_width">468dp</dimen>
+
+</resources>
diff --git a/main/res/values-v31/styles.xml b/main/res/values-v31/styles.xml
index 4fa3012..cf98b0b 100644
--- a/main/res/values-v31/styles.xml
+++ b/main/res/values-v31/styles.xml
@@ -17,6 +17,85 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Main theme for dynamic color -->
+ <style name="SudDynamicColorTheme">
+ <item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_dark</item>
+ <item name="android:textColorLink">@color/sud_system_accent1_300</item>
+ <item name="alertDialogTheme">@style/SudDynamicColorAlertDialogThemeCompat</item>
+ <item name="android:datePickerDialogTheme">@style/SudDynamicColorDateTimePickerDialogTheme</item>
+ <item name="android:timePickerDialogTheme">@style/SudDynamicColorDateTimePickerDialogTheme</item>
+ <item name="sucFullDynamicColor">false</item>
+ <item name="sudSwitchBarThumbOnColor">@color/sud_dynamic_switch_thumb_on_dark</item>
+ <item name="sudSwitchBarTrackOnColor">@color/sud_dynamic_switch_track_on_dark</item>
+ <item name="sudSwitchBarThumbOffColor">@color/sud_dynamic_switch_thumb_off_dark</item>
+ <item name="sudSwitchBarTrackOffColor">@color/sud_dynamic_switch_track_off_dark</item>
+ <item name="sudEditBoxColor">@color/sud_dynamic_color_accent_glif_v3_dark</item>
+ </style>
+
+ <style name="SudDynamicColorTheme.Light">
+ <item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_light</item>
+ <item name="android:textColorLink">@color/sud_system_accent1_600</item>
+ <item name="alertDialogTheme">@style/SudDynamicColorAlertDialogThemeCompat.Light</item>
+ <item name="android:datePickerDialogTheme">@style/SudDynamicColorDateTimePickerDialogTheme.Light</item>
+ <item name="android:timePickerDialogTheme">@style/SudDynamicColorDateTimePickerDialogTheme.Light</item>
+ <item name="sucFullDynamicColor">false</item>
+ <item name="sudSwitchBarThumbOnColor">@color/sud_dynamic_switch_thumb_on_light</item>
+ <item name="sudSwitchBarTrackOnColor">@color/sud_dynamic_switch_track_on_light</item>
+ <item name="sudSwitchBarThumbOffColor">@color/sud_dynamic_switch_thumb_off_light</item>
+ <item name="sudSwitchBarTrackOffColor">@color/sud_dynamic_switch_track_off_light</item>
+ <item name="sudEditBoxColor">@color/sud_dynamic_color_accent_glif_v3_light</item>
+ </style>
+
+ <style name="SudFullDynamicColorTheme" parent="SudDynamicColorTheme">
+ <item name="android:windowBackground">@android:color/system_neutral1_900</item>
+ <item name="android:colorForeground">@android:color/system_neutral1_50</item>
+ <item name="android:colorForegroundInverse">@android:color/system_neutral1_900</item>
+ <item name="android:colorBackground">@android:color/system_neutral1_900</item>
+ <item name="android:colorBackgroundCacheHint">@android:color/system_neutral1_900</item>
+ <item name="colorBackgroundFloating">@android:color/system_neutral1_900</item>
+ <item name="android:navigationBarColor">@android:color/system_neutral1_900</item>
+
+ <item name="android:textColorPrimary">@color/sud_system_primary_text</item>
+ <item name="android:textColorSecondary">@color/sud_system_secondary_text</item>
+ <item name="android:textColorTertiary">@color/sud_system_tertiary_text_inactive</item>
+ <item name="android:textColorPrimaryDisableOnly">@color/sud_system_tertiary_text_inactive</item>
+ <item name="android:textColorPrimaryInverseDisableOnly">@color/sud_system_tertiary_text_inactive</item>
+
+ <item name="colorControlNormal">?android:attr/textColorSecondary</item>
+ <item name="colorControlHighlight">@color/ripple_material_dark</item>
+ <item name="colorButtonNormal">@color/button_material_dark</item>
+ <item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>
+
+ <item name="alertDialogTheme">@style/SudFullDynamicColorAlertDialogThemeCompat</item>
+
+ <item name="sucFullDynamicColor">true</item>
+ </style>
+
+ <style name="SudFullDynamicColorTheme.Light" parent="SudDynamicColorTheme.Light">
+ <item name="android:windowBackground">@android:color/system_neutral1_50</item>
+ <item name="android:colorForeground">@android:color/system_neutral1_900</item>
+ <item name="android:colorForegroundInverse">@android:color/system_neutral1_50</item>
+ <item name="android:colorBackground">@android:color/system_neutral1_50</item>
+ <item name="android:colorBackgroundCacheHint">@@android:color/system_neutral1_50</item>
+ <item name="colorBackgroundFloating">@android:color/system_neutral1_50</item>
+ <item name="android:navigationBarColor">@android:color/system_neutral1_50</item>
+
+ <item name="android:textColorPrimary">@color/sud_system_primary_text</item>
+ <item name="android:textColorSecondary">@color/sud_system_secondary_text</item>
+ <item name="android:textColorTertiary">@color/sud_system_tertiary_text_inactive</item>
+ <item name="android:textColorPrimaryDisableOnly">@color/sud_system_tertiary_text_inactive</item>
+
+ <item name="colorControlNormal">?android:attr/textColorSecondary</item>
+ <item name="colorControlHighlight">@color/ripple_material_light</item>
+ <item name="colorButtonNormal">@color/button_material_light</item>
+ <item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>
+
+ <item name="alertDialogTheme">@style/SudFullDynamicColorAlertDialogThemeCompat.Light</item>
+
+ <item name="sucFullDynamicColor">true</item>
+ </style>
+
+ <!-- Main theme for dynamic color -->
+ <!-- TODO: cleanup the Glifv3 dependent dynamic color theme -->
<style name="SudDynamicColorThemeGlifV3" parent="SudThemeGlifV3">
<item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_dark</item>
<item name="android:textColorLink">@color/sud_system_accent1_300</item>
@@ -28,6 +107,7 @@
<item name="sudSwitchBarTrackOnColor">@color/sud_dynamic_switch_track_on_dark</item>
<item name="sudSwitchBarThumbOffColor">@color/sud_dynamic_switch_thumb_off_dark</item>
<item name="sudSwitchBarTrackOffColor">@color/sud_dynamic_switch_track_off_dark</item>
+ <item name="sudEditBoxColor">@color/sud_dynamic_color_accent_glif_v3_dark</item>
</style>
<style name="SudDynamicColorThemeGlifV3.Light" parent="SudThemeGlifV3.Light">
@@ -41,6 +121,7 @@
<item name="sudSwitchBarTrackOnColor">@color/sud_dynamic_switch_track_on_light</item>
<item name="sudSwitchBarThumbOffColor">@color/sud_dynamic_switch_thumb_off_light</item>
<item name="sudSwitchBarTrackOffColor">@color/sud_dynamic_switch_track_off_light</item>
+ <item name="sudEditBoxColor">@color/sud_dynamic_color_accent_glif_v3_light</item>
</style>
<style name="SudFullDynamicColorThemeGlifV3" parent="SudDynamicColorThemeGlifV3">
@@ -99,7 +180,7 @@
<item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_dark</item>
<item name="dialogCornerRadius">@dimen/sud_glif_device_default_dialog_corner_radius</item>
<item name="buttonBarButtonStyle">@style/SudAppCompatButtonButtonBarAlertDialog</item>
- <item name="android:windowTitleStyle">@style/SudWindowTitleStyle</item>
+ <item name="android:windowTitleStyle">@style/SudMaterialYouWindowTitleStyle</item>
</style>
<style name="SudDynamicColorAlertDialogThemeCompat.Light" parent="Theme.AppCompat.Light.Dialog.Alert">
@@ -108,7 +189,7 @@
<item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_light</item>
<item name="dialogCornerRadius">@dimen/sud_glif_device_default_dialog_corner_radius</item>
<item name="buttonBarButtonStyle">@style/SudAppCompatButtonButtonBarAlertDialog.Light</item>
- <item name="android:windowTitleStyle">@style/SudWindowTitleStyle</item>
+ <item name="android:windowTitleStyle">@style/SudMaterialYouWindowTitleStyle</item>
</style>
<style name="SudAppCompatButtonButtonBarAlertDialog" parent="Widget.AppCompat.ButtonBar.AlertDialog">
@@ -121,7 +202,7 @@
<item name="android:textAppearance">@style/SudTextAppearanceDeviceDefaultMedium.Light</item>
</style>
- <style name="SudWindowTitleStyle" parent="RtlOverlay.DialogWindowTitle.AppCompat">
+ <style name="SudWindowTitleStyle" parent="RtlOverlay.DialogWindowTitle.AppCompat">
<item name="android:textAppearance">@style/SudDeviceDefaultWindowTitleTextAppearance</item>
</style>
@@ -130,6 +211,14 @@
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
+ <style name="SudMaterialYouWindowTitleStyle" parent="RtlOverlay.DialogWindowTitle.AppCompat">
+ <item name="android:textAppearance">@style/SudMaterialYouDeviceDefaultWindowTitleTextAppearance</item>
+ </style>
+
+ <style name="SudMaterialYouDeviceDefaultWindowTitleTextAppearance" parent="SudDeviceDefaultWindowTitleTextAppearance">
+ <item name="android:textSize">@dimen/sud_alert_dialog_title_text_size_material_you</item>
+ </style>
+
<style name="SudFullDynamicColorAlertDialogThemeCompat" parent="SudDynamicColorAlertDialogThemeCompat">
<item name="android:colorBackground">@color/sud_system_neutral1_900</item>
</style>
diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml
index 3f167ac..61798dd 100644
--- a/main/res/values/attrs.xml
+++ b/main/res/values/attrs.xml
@@ -112,10 +112,18 @@
<attr name="sudDividerInsetEnd" format="dimension|reference" />
<attr name="sudDividerInsetStart" format="dimension|reference" />
<attr name="sudDividerInsetStartNoIcon" format="dimension|reference" />
+ <attr name="sudDividerShown" format="boolean"/>
+ <attr name="sudItemContainerStyle" format="reference"/>
+ <attr name="sudItemIconContainerStyle" format="reference"/>
+ <attr name="sudItemTitleStyle" format="reference"/>
+ <attr name="sudItemSummaryStyle" format="reference"/>
<attr name="sudItemDescriptionStyle" format="reference" />
<attr name="sudItemDescriptionTitleStyle" format="reference" />
<attr name="sudContentFramePaddingTop" format="dimension|reference" />
<attr name="sudContentFramePaddingBottom" format="dimension|reference" />
+ <attr name="sudEditBoxStyle" format="reference" />
+ <attr name="sudEditBoxColor" format="reference" />
+ <attr name="sudGlifContentPaddingTop" format="dimension|reference" />
<attr name="sudHasStableIds" format="boolean|reference" />
@@ -216,6 +224,7 @@
<attr name="sudDividerInset" />
<attr name="sudDividerInsetEnd" />
<attr name="sudDividerInsetStart" />
+ <attr name="sudDividerShown" />
</declare-styleable>
<declare-styleable name="SudRecyclerItemAdapter">
diff --git a/main/res/values/dimens.xml b/main/res/values/dimens.xml
index a5aaca6..173d847 100644
--- a/main/res/values/dimens.xml
+++ b/main/res/values/dimens.xml
@@ -30,6 +30,8 @@
<!-- Dialog title text size -->
<dimen name="sud_alert_dialog_title_text_size">20sp</dimen>
+ <dimen name="sud_alert_dialog_title_text_size_material_you">24sp</dimen>
+
<!-- General -->
<dimen name="sud_layout_margin_sides">40dp</dimen>
@@ -50,6 +52,7 @@
<dimen name="sud_glif_margin_start">24dp</dimen>
<dimen name="sud_glif_margin_end">24dp</dimen>
<dimen name="sud_glif_icon_margin_top">56dp</dimen>
+ <dimen name="sud_glif_content_padding_top">0dp</dimen>
<dimen name="sud_horizontal_icon_height">32dp</dimen>
<dimen name="sud_glif_alert_dialog_corner_radius">8dp</dimen>
@@ -168,6 +171,14 @@
<dimen name="sud_items_padding_top">15dp</dimen>
<dimen name="sud_items_padding_bottom">15dp</dimen>
+ <!-- Items Material Next-->
+ <dimen name="sud_items_padding_top_material_you">18dp</dimen>
+ <dimen name="sud_items_padding_bottom_material_you">18dp</dimen>
+ <dimen name="sud_items_title_text_size_material_you">20sp</dimen>
+ <dimen name="sud_items_summary_text_size_material_you">14sp</dimen>
+ <dimen name="sud_items_summary_margin_top_material_you">4dp</dimen>
+ <dimen name="sud_items_min_height_material_you">72dp</dimen>
+
<!-- Ignore UnusedResources: can be used by clients -->
<dimen name="sud_items_icon_divider_inset" tools:ignore="UnusedResources">88dp</dimen>
<!-- Ignore UnusedResources: can be used by clients -->
diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml
index c6dea59..1ee239d 100644
--- a/main/res/values/styles.xml
+++ b/main/res/values/styles.xml
@@ -52,6 +52,7 @@
<item name="sudDividerInsetEnd">0dp</item>
<item name="sudDividerInsetStart">@dimen/sud_items_icon_divider_inset</item>
<item name="sudDividerInsetStartNoIcon">@dimen/sud_items_text_divider_inset</item>
+ <item name="sudDividerShown">true</item>
<item name="sudItemDescriptionStyle">@style/SudItemContainer.Description</item>
<item name="sudItemDescriptionTitleStyle">@style/SudItemTitle</item>
<item name="sudListItemIconColor">@color/sud_list_item_icon_color_dark</item>
@@ -64,6 +65,12 @@
<item name="sudContentIllustrationPaddingTop">@dimen/sud_content_illustration_padding_vertical</item>
<item name="sudContentIllustrationPaddingBottom">@dimen/sud_content_illustration_padding_vertical</item>
<item name="sudLoadingHeaderHeight">@dimen/sud_loading_header_height</item>
+ <item name="sudEditBoxStyle">@style/SudEditBoxTheme</item>
+ <item name="sudEditBoxColor">@color/sud_color_accent_dark</item>
+ <item name="sudItemContainerStyle">@style/SudItemContainer</item>
+ <item name="sudItemIconContainerStyle">@style/SudItemIconContainer</item>
+ <item name="sudItemTitleStyle">@style/SudItemTitle</item>
+ <item name="sudItemSummaryStyle">@style/SudItemSummaryGlif</item>
</style>
<style name="SudThemeMaterial.Light" parent="Theme.AppCompat.Light.NoActionBar">
@@ -99,6 +106,7 @@
<item name="sudDividerInsetEnd">0dp</item>
<item name="sudDividerInsetStart">@dimen/sud_items_icon_divider_inset</item>
<item name="sudDividerInsetStartNoIcon">@dimen/sud_items_text_divider_inset</item>
+ <item name="sudDividerShown">true</item>
<item name="sudItemDescriptionStyle">@style/SudItemContainer.Description</item>
<item name="sudItemDescriptionTitleStyle">@style/SudItemTitle</item>
<item name="sudListItemIconColor">@color/sud_list_item_icon_color_light</item>
@@ -111,6 +119,12 @@
<item name="sudContentIllustrationPaddingTop">@dimen/sud_content_illustration_padding_vertical</item>
<item name="sudContentIllustrationPaddingBottom">@dimen/sud_content_illustration_padding_vertical</item>
<item name="sudLoadingHeaderHeight">@dimen/sud_loading_header_height</item>
+ <item name="sudEditBoxStyle">@style/SudEditBoxTheme</item>
+ <item name="sudEditBoxColor">@color/sud_color_accent_light</item>
+ <item name="sudItemContainerStyle">@style/SudItemContainer</item>
+ <item name="sudItemIconContainerStyle">@style/SudItemIconContainer</item>
+ <item name="sudItemTitleStyle">@style/SudItemTitle</item>
+ <item name="sudItemSummaryStyle">@style/SudItemSummaryGlif</item>
</style>
<style name="SudBaseThemeGlif" parent="Theme.AppCompat.NoActionBar">
@@ -150,6 +164,7 @@
<item name="sudDividerInsetEnd">0dp</item>
<item name="sudDividerInsetStart">@dimen/sud_items_glif_icon_divider_inset</item>
<item name="sudDividerInsetStartNoIcon">@dimen/sud_items_glif_text_divider_inset</item>
+ <item name="sudDividerShown">true</item>
<item name="sudGlifHeaderGravity">start</item>
<item name="sudGlifSubtitleGravity">start</item>
<item name="sucGlifHeaderMarginTop">@dimen/sud_glif_header_title_margin_top</item>
@@ -160,6 +175,7 @@
<item name="sudGlifIconStyle">@style/SudGlifIcon</item>
<item name="sucGlifIconMarginTop">@dimen/sud_glif_icon_margin_top</item>
<item name="sudGlifIconSize">@dimen/sud_glif_icon_max_height</item>
+ <item name="sudGlifContentPaddingTop">@dimen/sud_glif_content_padding_top</item>
<item name="sudItemDescriptionStyle">@style/SudItemContainer.Description.Glif</item>
<item name="sudItemDescriptionTitleStyle">@style/SudItemTitle.GlifDescription</item>
<item name="sudListItemIconColor">@color/sud_list_item_icon_color_dark</item>
@@ -191,6 +207,12 @@
<item name="sudSwitchBarTrackOnColor">@color/sud_switch_track_on_dark</item>
<item name="sudSwitchBarThumbOffColor">@color/sud_switch_thumb_off_dark</item>
<item name="sudSwitchBarTrackOffColor">@color/sud_switch_track_off_dark</item>
+ <item name="sudEditBoxStyle">@style/SudEditBoxTheme</item>
+ <item name="sudEditBoxColor">@color/sud_color_accent_glif_dark</item>
+ <item name="sudItemContainerStyle">@style/SudItemContainer</item>
+ <item name="sudItemIconContainerStyle">@style/SudItemIconContainer</item>
+ <item name="sudItemTitleStyle">@style/SudItemTitle</item>
+ <item name="sudItemSummaryStyle">@style/SudItemSummaryGlif</item>
</style>
<style name="SudThemeGlif" parent="SudBaseThemeGlif"/>
@@ -231,6 +253,7 @@
<item name="sudDividerInsetEnd">0dp</item>
<item name="sudDividerInsetStart">@dimen/sud_items_glif_icon_divider_inset</item>
<item name="sudDividerInsetStartNoIcon">@dimen/sud_items_glif_text_divider_inset</item>
+ <item name="sudDividerShown">true</item>
<item name="sudGlifHeaderGravity">start</item>
<item name="sudGlifSubtitleGravity">start</item>
<item name="sucGlifHeaderMarginTop">@dimen/sud_glif_header_title_margin_top</item>
@@ -241,6 +264,7 @@
<item name="sudGlifIconStyle">@style/SudGlifIcon</item>
<item name="sucGlifIconMarginTop">@dimen/sud_glif_icon_margin_top</item>
<item name="sudGlifIconSize">@dimen/sud_glif_icon_max_height</item>
+ <item name="sudGlifContentPaddingTop">@dimen/sud_glif_content_padding_top</item>
<item name="sudItemDescriptionStyle">@style/SudItemContainer.Description.Glif</item>
<item name="sudItemDescriptionTitleStyle">@style/SudItemTitle.GlifDescription</item>
<item name="sudListItemIconColor">@color/sud_list_item_icon_color_light</item>
@@ -272,6 +296,12 @@
<item name="sudSwitchBarTrackOnColor">@color/sud_switch_track_on_light</item>
<item name="sudSwitchBarThumbOffColor">@color/sud_switch_thumb_off_light</item>
<item name="sudSwitchBarTrackOffColor">@color/sud_switch_track_off_light</item>
+ <item name="sudEditBoxStyle">@style/SudEditBoxTheme</item>
+ <item name="sudEditBoxColor">@color/sud_color_accent_glif_light</item>
+ <item name="sudItemContainerStyle">@style/SudItemContainer</item>
+ <item name="sudItemIconContainerStyle">@style/SudItemIconContainer</item>
+ <item name="sudItemTitleStyle">@style/SudItemTitle</item>
+ <item name="sudItemSummaryStyle">@style/SudItemSummaryGlif</item>
</style>
<style name="SudThemeGlif.Light" parent="SudBaseThemeGlif.Light"/>
@@ -322,6 +352,7 @@
<item name="sudButtonAllCaps">false</item>
<item name="sudButtonCornerRadius">@dimen/sud_glif_v3_button_corner_radius</item>
<item name="sudButtonFontFamily">@string/sudFontSecondaryMedium</item>
+ <item name="sudEditBoxColor">@color/sud_color_accent_glif_v3_dark</item>
</style>
<style name="SudThemeGlifV3" parent="SudBaseThemeGlifV3" />
<style name="SudDynamicColorThemeGlifV3" parent="SudThemeGlifV3" />
@@ -335,26 +366,41 @@
<item name="sudButtonAllCaps">false</item>
<item name="sudButtonCornerRadius">@dimen/sud_glif_v3_button_corner_radius</item>
<item name="sudButtonFontFamily">@string/sudFontSecondaryMedium</item>
+ <item name="sudEditBoxColor">@color/sud_color_accent_glif_v3_light</item>
</style>
<style name="SudThemeGlifV3.Light" parent="SudBaseThemeGlifV3.Light" />
<style name="SudDynamicColorThemeGlifV3.Light" parent="SudThemeGlifV3.Light" />
<style name="SudFullDynamicColorThemeGlifV3.Light" parent="SudDynamicColorThemeGlifV3.Light" />
- <style name="Animation.SudWindowAnimation" parent="@android:style/Animation.Activity">
- <item name="android:activityOpenEnterAnimation">@anim/sud_slide_next_in</item>
- <item name="android:activityOpenExitAnimation">@anim/sud_slide_next_out</item>
- <item name="android:activityCloseEnterAnimation">@anim/sud_slide_back_in</item>
- <item name="android:activityCloseExitAnimation">@anim/sud_slide_back_out</item>
- </style>
+ <style name="SudThemeGlifV4" parent="SudThemeGlifV3" />
+ <style name="SudThemeGlifV4.Light" parent="SudThemeGlifV3.Light" />
+
+ <style name="SudDynamicColorTheme" />
+ <style name="SudDynamicColorTheme.Light" />
+ <style name="SudFullDynamicColorTheme" parent="SudDynamicColorTheme"/>
+ <style name="SudFullDynamicColorTheme.Light" parent="SudDynamicColorTheme.Light" />
+
<!-- DayNight themes -->
<style name="SudThemeMaterial.DayNight" parent="SudThemeMaterial.Light" />
<style name="SudThemeGlif.DayNight" parent="SudThemeGlif.Light" />
<style name="SudThemeGlifV2.DayNight" parent="SudThemeGlifV2.Light" />
<style name="SudThemeGlifV3.DayNight" parent="SudThemeGlifV3.Light" />
+ <style name="SudThemeGlifV4.DayNight" parent="SudThemeGlifV4.Light" />
+
+ <!-- DynamicColor DayNight themes -->
<style name="SudDynamicColorThemeGlifV3.DayNight" parent="SudDynamicColorThemeGlifV3.Light" />
<style name="SudFullDynamicColorThemeGlifV3.DayNight" parent="SudFullDynamicColorThemeGlifV3.Light" />
+ <style name="SudDynamicColorTheme.DayNight" parent="SudDynamicColorTheme.Light" />
+ <style name="SudFullDynamicColorTheme.DayNight" parent="SudFullDynamicColorTheme.Light" />
+
+ <style name="Animation.SudWindowAnimation" parent="@android:style/Animation.Activity">
+ <item name="android:activityOpenEnterAnimation">@anim/sud_slide_next_in</item>
+ <item name="android:activityOpenExitAnimation">@anim/sud_slide_next_out</item>
+ <item name="android:activityCloseEnterAnimation">@anim/sud_slide_back_in</item>
+ <item name="android:activityCloseExitAnimation">@anim/sud_slide_back_out</item>
+ </style>
<!-- Content styles -->
<!-- Ignore UnusedResources: Used by clients -->
@@ -622,6 +668,10 @@
<style name="SudGlifButtonBar.Stackable" parent="SudGlifButtonBar">
<item name="android:gravity">center</item>
</style>
+ <!-- Edit box theme-->
+ <style name="SudEditBoxTheme">
+ <item name="colorPrimary">?attr/sudEditBoxColor</item>
+ </style>
<!-- Items styles -->
@@ -635,6 +685,20 @@
<item name="android:paddingTop">@dimen/sud_items_padding_top</item>
</style>
+ <style name="SudItemContainerMaterialYou">
+ <item name="android:paddingBottom">@dimen/sud_items_padding_bottom_material_you</item>
+ <item name="android:paddingEnd" tools:ignore="NewApi">?attr/listPreferredItemPaddingRight</item>
+ <item name="android:paddingLeft">?attr/listPreferredItemPaddingLeft</item>
+ <item name="android:paddingRight">?attr/listPreferredItemPaddingRight</item>
+ <item name="android:paddingStart" tools:ignore="NewApi">?attr/listPreferredItemPaddingLeft</item>
+ <item name="android:paddingTop">@dimen/sud_items_padding_top_material_you</item>
+ <item name="android:minHeight">@dimen/sud_items_min_height_material_you</item>
+ </style>
+
+ <style name="SudItemIconContainer">
+ <item name="android:layout_width">@dimen/sud_items_icon_container_width</item>
+ </style>
+
<style name="SudItemContainer.Description" parent="SudItemContainer">
<item name="android:paddingTop">@dimen/sud_description_margin_top</item>
<item name="android:paddingBottom">@dimen/sud_description_margin_bottom_lists</item>
@@ -655,10 +719,25 @@
<item name="android:textAppearance">?attr/textAppearanceListItemSmall</item>
</style>
+ <style name="SudItemSummaryGlif">
+ <item name="android:textAppearance">?attr/textAppearanceListItemSmall</item>
+ <item name="android:layout_marginBottom">@dimen/sud_items_padding_bottom_extra</item>
+ </style>
+
+ <style name="SudItemSummaryMaterialYou">
+ <item name="android:textAppearance">?attr/textAppearanceListItemSmall</item>
+ <item name="android:layout_marginBottom">@dimen/sud_items_padding_bottom_extra</item>
+ <item name="android:layout_marginTop">@dimen/sud_items_summary_margin_top_material_you</item>
+ </style>
+
<style name="SudItemTitle">
<item name="android:textAppearance">?attr/textAppearanceListItem</item>
</style>
+ <style name="SudItemTitleMaterialYou">
+ <item name="android:textAppearance">?attr/textAppearanceListItem</item>
+ </style>
+
<style name="SudItemTitle.GlifDescription" parent="SudItemTitle">
<item name="android:gravity">?attr/sudGlifHeaderGravity</item>
<item name="android:textAlignment" tools:targetApi="jelly_bean_mr1">gravity</item>
@@ -753,6 +832,16 @@
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
+ <style name="TextAppearance.SudMaterialYouItemTitle" parent="android:TextAppearance">
+ <item name="android:textSize">@dimen/sud_items_title_text_size_material_you</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ </style>
+
+ <style name="TextAppearance.SudMaterialYouItemSummary" parent="android:TextAppearance">
+ <item name="android:textSize">@dimen/sud_items_summary_text_size_material_you</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+
<!-- Navigation bar styles -->
<style name="SudNavBarTheme">
@@ -807,6 +896,22 @@
<style name="SudAlertDialogTheme" parent="SudAlertDialogThemeCompat"/>
<style name="SudAlertDialogTheme.Light" parent="SudAlertDialogThemeCompat.Light"/>
+ <style name="SudMaterialYouAlertDialogTitleStyle" parent="android:TextAppearance.DeviceDefault.WindowTitle">
+ <item name="android:textSize">@dimen/sud_alert_dialog_title_text_size_material_you</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ </style>
+
+ <style name="SudMaterialYouAlertDialogThemeCompat" parent="SudAlertDialogThemeCompat">
+ <item name="android:windowTitleStyle">@style/SudMaterialYouAlertDialogTitleStyle</item>
+ </style>
+
+ <style name="SudMaterialYouAlertDialogThemeCompat.Light" parent="SudAlertDialogThemeCompat.Light">
+ <item name="android:windowTitleStyle">@style/SudMaterialYouAlertDialogTitleStyle</item>
+ </style>
+
+ <style name="SudMaterialYouAlertDialogTheme" parent="SudMaterialYouAlertDialogThemeCompat"/>
+ <style name="SudMaterialYouAlertDialogTheme.Light" parent="SudMaterialYouAlertDialogThemeCompat.Light"/>
+
<style name="SudDateTimePickerDialogTheme" parent="Theme.AppCompat.Dialog">
<item name="android:textAllCaps">false</item>
<item name="colorAccent">@color/sud_color_accent_glif_v3_dark</item>
@@ -829,4 +934,10 @@
<item name="android:switchMinWidth">@dimen/sud_switch_min_width</item>
</style>
+ <style name="SudLandContentContianerStyle">
+ <item name="android:layout_width">0dp</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_weight">@dimen/sud_glif_land_content_area_weight</item>
+ <item name="android:focusedByDefault" tools:targetApi="o">true</item>
+ </style>
</resources>
diff --git a/main/src/com/google/android/setupdesign/items/Item.java b/main/src/com/google/android/setupdesign/items/Item.java
index ff2e3ce..407eacb 100644
--- a/main/src/com/google/android/setupdesign/items/Item.java
+++ b/main/src/com/google/android/setupdesign/items/Item.java
@@ -66,6 +66,7 @@ public class Item extends AbstractItem {
visible = a.getBoolean(R.styleable.SudItem_android_visible, true);
iconTint = a.getColor(R.styleable.SudItem_sudIconTint, Color.TRANSPARENT);
iconGravity = a.getInt(R.styleable.SudItem_sudIconGravity, Gravity.CENTER_VERTICAL);
+
a.recycle();
}
@@ -171,6 +172,10 @@ public class Item extends AbstractItem {
return visible;
}
+ private boolean hasSummary(CharSequence summary) {
+ return summary != null && summary.length() > 0;
+ }
+
@Override
public int getViewId() {
return getId();
@@ -183,7 +188,7 @@ public class Item extends AbstractItem {
TextView summaryView = (TextView) view.findViewById(R.id.sud_items_summary);
CharSequence summary = getSummary();
- if (summary != null && summary.length() > 0) {
+ if (hasSummary(summary)) {
summaryView.setText(summary);
summaryView.setVisibility(View.VISIBLE);
} else {
diff --git a/main/src/com/google/android/setupdesign/template/ListMixin.java b/main/src/com/google/android/setupdesign/template/ListMixin.java
index bfaf640..1cd55f2 100644
--- a/main/src/com/google/android/setupdesign/template/ListMixin.java
+++ b/main/src/com/google/android/setupdesign/template/ListMixin.java
@@ -52,7 +52,6 @@ public class ListMixin implements Mixin {
private int dividerInsetStart;
private int dividerInsetEnd;
-
/** @param layout The layout this mixin belongs to. */
public ListMixin(
@NonNull TemplateLayout layout, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
@@ -68,8 +67,8 @@ public class ListMixin implements Mixin {
setAdapter(new ItemAdapter(inflated));
}
- boolean isDividerDisplay = isDividerShown(context);
- if (isDividerDisplay) {
+ boolean isDividerDisplay = a.getBoolean(R.styleable.SudListMixin_sudDividerShown, true);
+ if (isDividerShown(context, isDividerDisplay)) {
int dividerInset = a.getDimensionPixelSize(R.styleable.SudListMixin_sudDividerInset, -1);
if (dividerInset != -1) {
setDividerInset(dividerInset);
@@ -98,23 +97,22 @@ public class ListMixin implements Mixin {
setDividerInsets(dividerInsetStart, dividerInsetEnd);
}
}
+ else{
+ getListView().setDivider(null);
+ }
a.recycle();
}
- private boolean isDividerShown(Context context) {
+ private boolean isDividerShown(Context context, boolean isDividerDisplay) {
if (PartnerStyleHelper.shouldApplyPartnerResource(templateLayout)) {
if (PartnerConfigHelper.get(context)
.isPartnerConfigAvailable(PartnerConfig.CONFIG_ITEMS_DIVIDER_SHOWN)) {
- boolean isDividerDisplayed =
+ isDividerDisplay =
PartnerConfigHelper.get(context)
.getBoolean(context, PartnerConfig.CONFIG_ITEMS_DIVIDER_SHOWN, true);
- if (!isDividerDisplayed) {
- getListView().setDivider(null);
- return isDividerDisplayed;
- }
}
}
- return true;
+ return isDividerDisplay;
}
/**
diff --git a/main/src/com/google/android/setupdesign/util/ThemeHelper.java b/main/src/com/google/android/setupdesign/util/ThemeHelper.java
index 3c46be9..497b88e 100644
--- a/main/src/com/google/android/setupdesign/util/ThemeHelper.java
+++ b/main/src/com/google/android/setupdesign/util/ThemeHelper.java
@@ -71,12 +71,14 @@ public final class ThemeHelper {
public static final String THEME_GLIF_V3_LIGHT = "glif_v3_light";
/**
- * Placeholder, not avirailed yet.
+ * Passed in a setup wizard intent as {@link WizardManagerHelper#EXTRA_THEME}. This is the dark
+ * variant of the theme used in setup wizard for T.
*/
public static final String THEME_GLIF_V4 = "glif_v4";
/**
- * Placeholder, not avirailed yet.
+ * Passed in a setup wizard intent as {@link WizardManagerHelper#EXTRA_THEME}. This is the default
+ * theme used in setup wizard for T.
*/
public static final String THEME_GLIF_V4_LIGHT = "glif_v4_light";
@@ -166,6 +168,11 @@ public final class ThemeHelper {
return PartnerConfigHelper.shouldApplyExtendedPartnerConfig(context);
}
+ /** Returns true if the SetupWizard is flow enabled "Material You(Glifv4)" style. */
+ public static boolean shouldApplyMaterialYouStyle(@NonNull Context context) {
+ return PartnerConfigHelper.shouldApplyMaterialYouStyle(context);
+ }
+
/** Returns {@code true} if this {@code context} should apply dynamic color. */
public static boolean shouldApplyDynamicColor(@NonNull Context context) {
return PartnerConfigHelper.isSetupWizardDynamicColorEnabled(context);
diff --git a/main/src/com/google/android/setupdesign/util/ThemeResolver.java b/main/src/com/google/android/setupdesign/util/ThemeResolver.java
index c7a28b1..d90b104 100644
--- a/main/src/com/google/android/setupdesign/util/ThemeResolver.java
+++ b/main/src/com/google/android/setupdesign/util/ThemeResolver.java
@@ -156,6 +156,9 @@ public class ThemeResolver {
private static int getDayNightThemeRes(@Nullable String theme) {
if (theme != null) {
switch (theme) {
+ case ThemeHelper.THEME_GLIF_V4_LIGHT:
+ case ThemeHelper.THEME_GLIF_V4:
+ return R.style.SudThemeGlifV4_DayNight;
case ThemeHelper.THEME_GLIF_V3_LIGHT:
case ThemeHelper.THEME_GLIF_V3:
return R.style.SudThemeGlifV3_DayNight;
@@ -183,6 +186,10 @@ public class ThemeResolver {
private static int getThemeRes(@Nullable String theme) {
if (theme != null) {
switch (theme) {
+ case ThemeHelper.THEME_GLIF_V4_LIGHT:
+ return R.style.SudThemeGlifV4_Light;
+ case ThemeHelper.THEME_GLIF_V4:
+ return R.style.SudThemeGlifV4;
case ThemeHelper.THEME_GLIF_V3_LIGHT:
return R.style.SudThemeGlifV3_Light;
case ThemeHelper.THEME_GLIF_V3:
@@ -218,6 +225,9 @@ public class ThemeResolver {
private static int getThemeVersion(String theme) {
if (theme != null) {
switch (theme) {
+ case ThemeHelper.THEME_GLIF_V4_LIGHT:
+ case ThemeHelper.THEME_GLIF_V4:
+ return 5;
case ThemeHelper.THEME_GLIF_V3_LIGHT:
case ThemeHelper.THEME_GLIF_V3:
return 4;
diff --git a/main/src/com/google/android/setupdesign/view/IconUniformityAppImageView.java b/main/src/com/google/android/setupdesign/view/IconUniformityAppImageView.java
index 9f0e21d..d4e6ad8 100644
--- a/main/src/com/google/android/setupdesign/view/IconUniformityAppImageView.java
+++ b/main/src/com/google/android/setupdesign/view/IconUniformityAppImageView.java
@@ -25,11 +25,11 @@ import android.graphics.Outline;
import android.graphics.RectF;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
-import androidx.annotation.ColorRes;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewOutlineProvider;
import android.widget.ImageView;
+import androidx.annotation.ColorRes;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.google.android.setupdesign.R;