diff options
Diffstat (limited to 'main/res')
19 files changed, 269 insertions, 11 deletions
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 9cd846d..dd4d52d 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 @@ -17,6 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> 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 6f6f20e..478ac5f 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 @@ -17,6 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> 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 e3a2ba5..c03d2fe 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 @@ -17,6 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> 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 d7d0985..4840caf 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 @@ -18,6 +18,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> 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 5407be1..d1b6b92 100644 --- a/main/res/layout-land-v31/sud_glif_template_content.xml +++ b/main/res/layout-land-v31/sud_glif_template_content.xml @@ -17,6 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> diff --git a/main/res/layout-v31/sud_glif_preference_template_content.xml b/main/res/layout-v31/sud_glif_preference_template_content.xml index dce2b83..c618139 100644 --- a/main/res/layout-v31/sud_glif_preference_template_content.xml +++ b/main/res/layout-v31/sud_glif_preference_template_content.xml @@ -17,10 +17,11 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <include layout="@layout/sud_glif_blank_template_content" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/main/res/layout/sud_content_info.xml b/main/res/layout/sud_content_info.xml new file mode 100644 index 0000000..288c3af --- /dev/null +++ b/main/res/layout/sud_content_info.xml @@ -0,0 +1,61 @@ +<?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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/sud_content_info_container" + style="@style/SudInfoContainer" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:baselineAligned="false" + android:orientation="horizontal"> + + <FrameLayout + android:id="@+id/sud_content_info_icon_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:gravity="start"> + + <ImageView + android:id="@+id/sud_content_info_icon" + android:layout_width="@dimen/sud_content_info_icon_size" + android:layout_height="@dimen/sud_content_info_icon_size" + android:layout_marginEnd="@dimen/sud_content_info_icon_margin_end" + tools:ignore="ContentDescription" /> + + </FrameLayout> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="center_vertical" + android:orientation="vertical"> + + <com.google.android.setupdesign.view.RichTextView + android:id="@+id/sud_content_info_description" + style="@style/SudInfoDescription" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="start" + android:textAlignment="viewStart" + tools:ignore="UnusedAttribute" /> + + </LinearLayout> + +</LinearLayout> diff --git a/main/res/layout/sud_glif_blank_template_content.xml b/main/res/layout/sud_glif_blank_template_content.xml index 1eaae13..887655d 100644 --- a/main/res/layout/sud_glif_blank_template_content.xml +++ b/main/res/layout/sud_glif_blank_template_content.xml @@ -17,6 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> diff --git a/main/res/layout/sud_glif_header.xml b/main/res/layout/sud_glif_header.xml index 564a5fe..50feeb2 100644 --- a/main/res/layout/sud_glif_header.xml +++ b/main/res/layout/sud_glif_header.xml @@ -22,13 +22,25 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <ImageView - android:id="@+id/sud_layout_icon" - style="?attr/sudGlifIconStyle" - android:layout_width="wrap_content" + <FrameLayout + android:id="@+id/sud_layout_icon_container" + style="@style/SudGlifIconContainer" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:contentDescription="@null" - android:visibility="gone" /> + android:visibility="gone" > + <ImageView + android:id="@+id/sud_layout_icon" + style="?attr/sudGlifIconStyle" + android:layout_marginLeft="0dp" + android:layout_marginRight="0dp" + android:layout_marginTop="0dp" + android:layout_marginBottom="0dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@null" + android:layout_gravity="?attr/sudGlifHeaderGravity" + android:visibility="gone" /> + </FrameLayout> <TextView android:id="@+id/suc_layout_title" diff --git a/main/res/layout/sud_glif_list_template_content.xml b/main/res/layout/sud_glif_list_template_content.xml index 1a6b4cd..09c56d2 100644 --- a/main/res/layout/sud_glif_list_template_content.xml +++ b/main/res/layout/sud_glif_list_template_content.xml @@ -18,6 +18,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> diff --git a/main/res/layout/sud_glif_recycler_template_content.xml b/main/res/layout/sud_glif_recycler_template_content.xml index 9ca640b..c2cccf0 100644 --- a/main/res/layout/sud_glif_recycler_template_content.xml +++ b/main/res/layout/sud_glif_recycler_template_content.xml @@ -19,6 +19,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> diff --git a/main/res/layout/sud_glif_template_content.xml b/main/res/layout/sud_glif_template_content.xml index 33dbe8c..fa898eb 100644 --- a/main/res/layout/sud_glif_template_content.xml +++ b/main/res/layout/sud_glif_template_content.xml @@ -18,6 +18,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/sud_layout_template_content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> diff --git a/main/res/values-night/colors.xml b/main/res/values-night/colors.xml new file mode 100644 index 0000000..38f9bc2 --- /dev/null +++ b/main/res/values-night/colors.xml @@ -0,0 +1,28 @@ +<?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> + + <color name="system_primary_text">#FFFFFF</color> + <color name="system_secondary_text">#9AA0A6</color> + <color name="system_disable_option">#5F6368</color> + <color name="system_error_warning">#EE675C</color> + <color name="system_success_done">#5BB974</color> + <color name="system_fallback_accent">#669DF6</color> + <color name="system_accent_primary">@color/system_accent2_200</color> + +</resources>
\ No newline at end of file diff --git a/main/res/values-night/styles.xml b/main/res/values-night/styles.xml index ca94c12..d609b4c 100644 --- a/main/res/values-night/styles.xml +++ b/main/res/values-night/styles.xml @@ -22,5 +22,7 @@ <style name="SudThemeGlif.DayNight" parent="SudThemeGlif" /> <style name="SudThemeGlifV2.DayNight" parent="SudThemeGlifV2" /> <style name="SudThemeGlifV3.DayNight" parent="SudThemeGlifV3" /> + <style name="SudDynamicColorThemeGlifV3.DayNight" parent="SudDynamicColorThemeGlifV3" /> + <style name="SudFullDynamicColorThemeGlifV3.DayNight" parent="SudFullDynamicColorThemeGlifV3" /> </resources> diff --git a/main/res/values-v31/colors.xml b/main/res/values-v31/colors.xml new file mode 100644 index 0000000..03bc425 --- /dev/null +++ b/main/res/values-v31/colors.xml @@ -0,0 +1,47 @@ +<?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> + <!-- Default color for BC --> + <color name="sud_color_accent_glif_v3_dark">#ff669df6</color> + <color name="sud_color_accent_glif_v3_light">#ff1a73e8</color> + + <!-- Accent color --> + <color name="sud_dynamic_color_accent_glif_v3_dark">@color/sud_system_accent2_300</color> + <color name="sud_dynamic_color_accent_glif_v3_light">@color/sud_system_accent2_500</color> + + <color name="sud_system_accent2_0">@android:color/system_accent2_0</color> + <color name="sud_system_accent2_50">@android:color/system_accent2_50</color> + <color name="sud_system_accent2_100">@android:color/system_accent2_100</color> + <color name="sud_system_accent2_200">@android:color/system_accent2_200</color> + <color name="sud_system_accent2_300">@android:color/system_accent2_300</color> + <color name="sud_system_accent2_400">@android:color/system_accent2_400</color> + <color name="sud_system_accent2_500">@android:color/system_accent2_500</color> + <color name="sud_system_accent2_600">@android:color/system_accent2_600</color> + <color name="sud_system_accent2_700">@android:color/system_accent2_700</color> + <color name="sud_system_accent2_800">@android:color/system_accent2_800</color> + <color name="sud_system_accent2_900">@android:color/system_accent2_900</color> + <color name="sud_system_accent2_1000">@android:color/system_accent2_1000</color> + + <color name="sud_system_primary_text">@color/system_primary_text</color> + <color name="sud_system_secondary_text">@color/system_secondary_text</color> + <color name="sud_system_disable_option">@color/system_disable_option</color> + <color name="sud_system_error_warning">@color/system_error_warning</color> + <color name="sud_system_success_done">@color/system_success_done</color> + <color name="sud_system_fallback_accent">@color/system_fallback_accent</color> + +</resources>
\ No newline at end of file diff --git a/main/res/values-v31/styles.xml b/main/res/values-v31/styles.xml new file mode 100644 index 0000000..a9fbade --- /dev/null +++ b/main/res/values-v31/styles.xml @@ -0,0 +1,38 @@ +<?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> + <style name="SudDynamicColorThemeGlifV3" parent="SudThemeGlifV3"> + <item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_dark</item> + <item name="android:textColorLink">@color/sud_dynamic_color_accent_glif_v3_dark</item> + <item name="sucFullDynamicColor">false</item> + </style> + + <style name="SudDynamicColorThemeGlifV3.Light" parent="SudThemeGlifV3.Light"> + <item name="colorAccent">@color/sud_dynamic_color_accent_glif_v3_light</item> + <item name="android:textColorLink">@color/sud_dynamic_color_accent_glif_v3_light</item> + <item name="sucFullDynamicColor">false</item> + </style> + + <style name="SudFullDynamicColorThemeGlifV3" parent="SudDynamicColorThemeGlifV3"> + <item name="sucFullDynamicColor">true</item> + </style> + + <style name="SudFullDynamicColorThemeGlifV3.Light" parent="SudDynamicColorThemeGlifV3.Light"> + <item name="sucFullDynamicColor">true</item> + </style> +</resources>
\ No newline at end of file diff --git a/main/res/values/colors.xml b/main/res/values/colors.xml index 1becb87..736cd91 100644 --- a/main/res/values/colors.xml +++ b/main/res/values/colors.xml @@ -18,7 +18,6 @@ <resources> <!-- General colors --> - <color name="sud_color_accent_dark">#ff448aff</color> <color name="sud_color_accent_light">#ff3367d6</color> <color name="sud_color_background_dark">#ff303030</color> @@ -35,7 +34,6 @@ <color name="sud_flat_button_highlight">#1f000000</color> <!-- Navigation bar colors --> - <color name="sud_navbar_bg_dark">#ff21272b</color> <color name="sud_navbar_bg_light">#ffe4e7e9</color> @@ -59,7 +57,36 @@ <color name="sud_glif_window_bg_light_color">#ffffffff</color> <!-- Color for error text --> - <color name="sud_color_error_text_dark">#fff28b82</color> <!-- Google red 300 --> - <color name="sud_color_error_text_light">#ffd93025</color> <!-- Google red 600 --> + <color name="sud_color_error_text_dark">#fff28b82</color> + <color name="sud_color_error_text_light">#ffd93025</color> + + + <!-- Default color--> + <color name="sud_dynamic_color_accent_glif_v3_dark">@color/sud_color_accent_glif_v3_dark</color> + <color name="sud_dynamic_color_accent_glif_v3_light">@color/sud_color_accent_glif_v3_light</color> + + <color name="system_accent2_0">#ffffff</color> + <color name="system_accent2_50">#CDFAF1</color> + <color name="system_accent2_100">#BFEBE3</color> + <color name="system_accent2_200">#A4CFC7</color> + <color name="system_accent2_300">#89B4AC</color> + <color name="system_accent2_400">#6F9991</color> + <color name="system_accent2_500">#537C75</color> + <color name="system_accent2_600">#3D665F</color> + <color name="system_accent2_700">#254E47</color> + <color name="system_accent2_800">#0C3731</color> + <color name="system_accent2_900">#00211C</color> + <color name="system_accent2_1000">#000000</color> + + <color name="error_color_device_default_dark">#ec928e</color> + <color name="error_color_device_default_light">#b3261e</color> + + <color name="system_primary_text">#202124</color> + <color name="system_secondary_text">#5F6368</color> + <color name="system_disable_option">#DADCE0</color> + <color name="system_error_warning">#D93025</color> + <color name="system_success_done">#1E8E3E</color> + <color name="system_fallback_accent">#1A73E8</color> + <color name="system_accent_primary">@color/system_accent2_600</color> </resources> diff --git a/main/res/values/dimens.xml b/main/res/values/dimens.xml index 40fcc2a..4bbd079 100644 --- a/main/res/values/dimens.xml +++ b/main/res/values/dimens.xml @@ -75,6 +75,14 @@ <dimen name="sud_content_illustration_min_width">172dp</dimen> <dimen name="sud_content_illustration_padding_vertical">24dp</dimen> + <!-- Glif Content info text --> + <dimen name="sud_content_info_text_size">16sp</dimen> + <dimen name="sud_content_info_line_spacing_extra">3sp</dimen> + <dimen name="sud_content_info_icon_size">18dp</dimen> + <dimen name="sud_content_info_icon_margin_end">16dp</dimen> + <dimen name="sud_content_info_padding_top">0dp</dimen> + <dimen name="sud_content_info_padding_bottom">0dp</dimen> + <!-- Margin on the start to offset for margin in the drawable --> <dimen name="sud_radio_button_margin_start">-6dp</dimen> <dimen name="sud_radio_button_margin_top">0dp</dimen> diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml index 70a81a8..2702359 100644 --- a/main/res/values/styles.xml +++ b/main/res/values/styles.xml @@ -296,6 +296,8 @@ <item name="sudButtonFontFamily">@string/sudFontSecondaryMedium</item> </style> <style name="SudThemeGlifV3" parent="SudBaseThemeGlifV3" /> + <style name="SudDynamicColorThemeGlifV3" parent="SudThemeGlifV3" /> + <style name="SudFullDynamicColorThemeGlifV3" parent="SudDynamicColorThemeGlifV3" /> <style name="SudBaseThemeGlifV3.Light" parent="SudThemeGlifV2.Light"> <item name="colorAccent">@color/sud_color_accent_glif_v3_light</item> @@ -307,6 +309,8 @@ <item name="sudButtonFontFamily">@string/sudFontSecondaryMedium</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> @@ -320,6 +324,8 @@ <style name="SudThemeGlif.DayNight" parent="SudThemeGlif.Light" /> <style name="SudThemeGlifV2.DayNight" parent="SudThemeGlifV2.Light" /> <style name="SudThemeGlifV3.DayNight" parent="SudThemeGlifV3.Light" /> + <style name="SudDynamicColorThemeGlifV3.DayNight" parent="SudDynamicColorThemeGlifV3.Light" /> + <style name="SudFullDynamicColorThemeGlifV3.DayNight" parent="SudFullDynamicColorThemeGlifV3.Light" /> <!-- Content styles --> @@ -332,6 +338,18 @@ <item name="android:paddingBottom">?attr/sudContentFramePaddingBottom</item> </style> + <!-- Content info --> + + <style name="SudInfoContainer"> + <item name="android:paddingTop">@dimen/sud_content_info_padding_top</item> + <item name="android:paddingBottom">@dimen/sud_content_info_padding_bottom</item> + </style> + + <style name="SudInfoDescription"> + <item name="android:textSize">@dimen/sud_content_info_text_size</item> + <item name="android:lineSpacingExtra">@dimen/sud_content_info_line_spacing_extra</item> + </style> + <!-- Ignore UnusedResources: Used by clients --> <style name="SudDescription" tools:ignore="UnusedResources"> <!-- Before Honeycomb, layout_gravity is needed for FrameLayout to apply the margins --> @@ -665,6 +683,13 @@ <item name="android:layout_marginBottom">?attr/sucHeaderContainerMarginBottom</item> </style> + <style name="SudGlifIconContainer"> + <item name="android:layout_marginLeft">?attr/sudMarginStart</item> + <item name="android:layout_marginRight">?attr/sudMarginEnd</item> + <item name="android:layout_marginTop">?attr/sucGlifIconMarginTop</item> + <item name="android:maxHeight">?attr/sudGlifIconSize</item> + </style> + <style name="SudGlifIcon"> <item name="android:layout_marginLeft">?attr/sudMarginStart</item> <item name="android:layout_marginRight">?attr/sudMarginEnd</item> |