summaryrefslogtreecommitdiff
path: root/main/res
diff options
context:
space:
mode:
authorSetup Wizard Team <android-setup-team-eng@google.com>2020-11-18 10:48:42 +0800
committerAlex Li <alexylli@google.com>2020-11-18 05:49:28 +0000
commitafd7e535b64af8e962776737cbea537418e2abf9 (patch)
tree57c72f27f85f38d655387adbd09f096392b2042d /main/res
parentba019d5b0ec03d1baaa5b6b810403077bf4a1db7 (diff)
downloadsetupdesign-afd7e535b64af8e962776737cbea537418e2abf9.tar.gz
Import updated Android Setupdesign Library 342991646
Copied from google3/third_party/java_src/android_libs/setupdesign Test: mm Bug: 173567690 Included changes: - 342991646 Extra the max height of glif icon to attribute - 342816870 Migrate TransitionHelper to setupdesign library - 342766776 Extra Icon margin top as attribute - 342749536 Create Glifv4 theme - 337810570 Add header title in portal progress screen - 333496149 [SetupCompat] Set visibility for PartnerConfig & Partner ... PiperOrigin-RevId: 342991646 Change-Id: Ib1b3fb96b0c73f3723e4889aa3eabfa8ad1972bc
Diffstat (limited to 'main/res')
-rw-r--r--main/res/anim/sud_pre_p_activity_close_enter.xml23
-rw-r--r--main/res/anim/sud_pre_p_activity_close_exit.xml30
-rw-r--r--main/res/anim/sud_pre_p_activity_open_enter.xml30
-rw-r--r--main/res/anim/sud_pre_p_activity_open_exit.xml24
-rw-r--r--main/res/anim/sud_stay.xml23
-rw-r--r--main/res/interpolator/sud_accelerate_quart.xml19
-rw-r--r--main/res/interpolator/sud_decelerate_quart.xml19
-rw-r--r--main/res/values-night/styles.xml1
-rw-r--r--main/res/values/attrs.xml1
-rw-r--r--main/res/values/dimens.xml8
-rw-r--r--main/res/values/styles.xml23
11 files changed, 197 insertions, 4 deletions
diff --git a/main/res/anim/sud_pre_p_activity_close_enter.xml b/main/res/anim/sud_pre_p_activity_close_enter.xml
new file mode 100644
index 0000000..b8a7654
--- /dev/null
+++ b/main/res/anim/sud_pre_p_activity_close_enter.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal">
+ <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:interpolator="@android:interpolator/linear_out_slow_in"
+ android:duration="250"/>
+</set>
diff --git a/main/res/anim/sud_pre_p_activity_close_exit.xml b/main/res/anim/sud_pre_p_activity_close_exit.xml
new file mode 100644
index 0000000..c813937
--- /dev/null
+++ b/main/res/anim/sud_pre_p_activity_close_exit.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false" android:zAdjustment="top">
+ <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+ android:interpolator="@android:interpolator/linear"
+ android:fillEnabled="true"
+ android:fillBefore="false" android:fillAfter="true"
+ android:startOffset="100"
+ android:duration="150"/>
+ <translate android:fromYDelta="0%" android:toYDelta="8%"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:interpolator="@interpolator/sud_accelerate_quart"
+ android:duration="250"/>
+</set>
diff --git a/main/res/anim/sud_pre_p_activity_open_enter.xml b/main/res/anim/sud_pre_p_activity_open_enter.xml
new file mode 100644
index 0000000..63acc28
--- /dev/null
+++ b/main/res/anim/sud_pre_p_activity_open_enter.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false"
+ android:zAdjustment="top">
+ <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+ android:interpolator="@interpolator/sud_decelerate_quart"
+ android:fillEnabled="true"
+ android:fillBefore="false" android:fillAfter="true"
+ android:duration="200"/>
+ <translate android:fromYDelta="8%" android:toYDelta="0"
+ android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+ android:interpolator="@android:interpolator/decelerate_quint"
+ android:duration="350"/>
+</set>
diff --git a/main/res/anim/sud_pre_p_activity_open_exit.xml b/main/res/anim/sud_pre_p_activity_open_exit.xml
new file mode 100644
index 0000000..950e32c
--- /dev/null
+++ b/main/res/anim/sud_pre_p_activity_open_exit.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:zAdjustment="normal">
+ <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+ android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
+ android:interpolator="@android:interpolator/fast_out_slow_in"
+ android:duration="217"/>
+</set>
diff --git a/main/res/anim/sud_stay.xml b/main/res/anim/sud_stay.xml
new file mode 100644
index 0000000..285e7af
--- /dev/null
+++ b/main/res/anim/sud_stay.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<!-- This is needed to keep the exiting window shown while the entering window fades in -->
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:duration="@android:integer/config_longAnimTime"
+ android:fromAlpha="1.0"
+ android:interpolator="@android:interpolator/decelerate_quad"
+ android:toAlpha="1.0" />
diff --git a/main/res/interpolator/sud_accelerate_quart.xml b/main/res/interpolator/sud_accelerate_quart.xml
new file mode 100644
index 0000000..b8a6ebf
--- /dev/null
+++ b/main/res/interpolator/sud_accelerate_quart.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:factor="2.0" />
diff --git a/main/res/interpolator/sud_decelerate_quart.xml b/main/res/interpolator/sud_decelerate_quart.xml
new file mode 100644
index 0000000..06d7fe8
--- /dev/null
+++ b/main/res/interpolator/sud_decelerate_quart.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2020 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.
+-->
+
+<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:factor="2.0" />
diff --git a/main/res/values-night/styles.xml b/main/res/values-night/styles.xml
index ca94c12..15c4028 100644
--- a/main/res/values-night/styles.xml
+++ b/main/res/values-night/styles.xml
@@ -22,5 +22,6 @@
<style name="SudThemeGlif.DayNight" parent="SudThemeGlif" />
<style name="SudThemeGlifV2.DayNight" parent="SudThemeGlifV2" />
<style name="SudThemeGlifV3.DayNight" parent="SudThemeGlifV3" />
+ <style name="SudThemeGlifV4.DayNight" parent="SudThemeGlifV4" />
</resources>
diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml
index 95c8bb5..54194a1 100644
--- a/main/res/values/attrs.xml
+++ b/main/res/values/attrs.xml
@@ -40,6 +40,7 @@
<flag name="end" value="0x00800005" />
</attr>
<attr name="sudGlifIconStyle" format="reference" />
+ <attr name="sudGlifIconSize" format="dimension" />
<attr name="sudButtonAllCaps" format="boolean" />
<attr name="sudButtonCornerRadius" format="dimension" />
diff --git a/main/res/values/dimens.xml b/main/res/values/dimens.xml
index 7508f25..1336137 100644
--- a/main/res/values/dimens.xml
+++ b/main/res/values/dimens.xml
@@ -29,9 +29,13 @@
<!-- Negative of sud_glif_button_padding -->
<dimen name="sud_glif_negative_button_padding">-16dp</dimen>
<dimen name="sud_glif_footer_padding_vertical">8dp</dimen>
+ <dimen name="sud_glif_footer_padding_start">8dp</dimen>
+ <!-- Calculated by (sud_glif_margin_sides - 4dp internal padding of button) -->
+ <dimen name="sud_glif_footer_padding_end">20dp</dimen>
<dimen name="sud_glif_footer_min_height">72dp</dimen>
<dimen name="sud_glif_margin_sides">24dp</dimen>
- <dimen name="sud_glif_margin_top">56dp</dimen>
+ <dimen name="sud_glif_icon_margin_top">56dp</dimen>
+ <dimen name="sud_glif_v4_icon_margin_top">48dp</dimen>
<dimen name="sud_glif_alert_dialog_corner_radius">8dp</dimen>
<dimen name="sud_glif_v3_button_corner_radius">4dp</dimen>
@@ -106,7 +110,7 @@
<dimen name="sud_glif_header_title_margin_bottom">2dp</dimen>
<dimen name="sud_glif_icon_max_height">32dp</dimen>
-
+ <dimen name="sud_glif_v4_icon_max_height">48dp</dimen>
<!-- Illustration -->
<item name="sud_illustration_aspect_ratio" format="float" type="dimen">2.22</item>
diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml
index 33fc940..03d20c6 100644
--- a/main/res/values/styles.xml
+++ b/main/res/values/styles.xml
@@ -121,6 +121,8 @@
<item name="sudDividerInsetStartNoIcon">@dimen/sud_items_glif_text_divider_inset</item>
<item name="sudGlifHeaderGravity">start</item>
<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="sudItemDescriptionStyle">@style/SudItemContainer.Description.Glif</item>
<item name="sudItemDescriptionTitleStyle">@style/SudItemTitle.GlifDescription</item>
<item name="sudListItemIconColor">@color/sud_list_item_icon_color_dark</item>
@@ -136,6 +138,8 @@
<item name="sucStatusBarBackground">?android:attr/colorBackground</item>
<item name="sucSystemNavBarBackgroundColor">@android:color/black</item>
<item name="sucFooterBarPaddingVertical">@dimen/sud_glif_footer_padding_vertical</item>
+ <item name="sucFooterBarPaddingStart">@dimen/sud_glif_footer_padding_start</item>
+ <item name="sucFooterBarPaddingEnd">@dimen/sud_glif_footer_padding_end</item>
</style>
<style name="SudThemeGlif" parent="SudBaseThemeGlif"/>
@@ -171,6 +175,8 @@
<item name="sudDividerInsetStartNoIcon">@dimen/sud_items_glif_text_divider_inset</item>
<item name="sudGlifHeaderGravity">start</item>
<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="sudItemDescriptionStyle">@style/SudItemContainer.Description.Glif</item>
<item name="sudItemDescriptionTitleStyle">@style/SudItemTitle.GlifDescription</item>
<item name="sudListItemIconColor">@color/sud_list_item_icon_color_light</item>
@@ -186,6 +192,8 @@
<item name="sucStatusBarBackground">?android:attr/colorBackground</item>
<item name="sucSystemNavBarBackgroundColor">@android:color/black</item>
<item name="sucFooterBarPaddingVertical">@dimen/sud_glif_footer_padding_vertical</item>
+ <item name="sucFooterBarPaddingStart">@dimen/sud_glif_footer_padding_start</item>
+ <item name="sucFooterBarPaddingEnd">@dimen/sud_glif_footer_padding_end</item>
</style>
<style name="SudThemeGlif.Light" parent="SudBaseThemeGlif.Light"/>
@@ -248,6 +256,16 @@
</style>
<style name="SudThemeGlifV3.Light" parent="SudBaseThemeGlifV3.Light" />
+ <style name="SudThemeGlifV4" parent="SudThemeGlifV3">
+ <item name="sucGlifIconMarginTop">@dimen/sud_glif_v4_icon_margin_top</item>
+ <item name="sudGlifIconSize">@dimen/sud_glif_v4_icon_max_height</item>
+ </style>
+
+ <style name="SudThemeGlifV4.Light" parent="SudThemeGlifV3.Light">
+ <item name="sucGlifIconMarginTop">@dimen/sud_glif_v4_icon_margin_top</item>
+ <item name="sudGlifIconSize">@dimen/sud_glif_v4_icon_max_height</item>
+ </style>
+
<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>
@@ -260,6 +278,7 @@
<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" />
<!-- Content styles -->
@@ -595,9 +614,9 @@
<style name="SudGlifIcon">
<item name="android:layout_marginLeft">?attr/sudMarginSides</item>
<item name="android:layout_marginRight">?attr/sudMarginSides</item>
- <item name="android:layout_marginTop">@dimen/sud_glif_margin_top</item>
+ <item name="android:layout_marginTop">?attr/sucGlifIconMarginTop</item>
<item name="android:adjustViewBounds">true</item>
- <item name="android:maxHeight">@dimen/sud_glif_icon_max_height</item>
+ <item name="android:maxHeight">?attr/sudGlifIconSize</item>
<item name="android:scaleType">centerInside</item>
</style>