diff options
author | Setup Wizard Team <android-setup-team-eng@google.com> | 2021-01-27 15:58:17 +0800 |
---|---|---|
committer | Nicole Huang <nicolehuang@google.com> | 2021-01-27 11:15:03 +0000 |
commit | 13e0225dad0a25f6865f0fab308309c3749ac957 (patch) | |
tree | d9911d5a1c63c16637fef29dc88eb5406cfefbbf /main/res | |
parent | 1566b59c3c4a54877291db2319f3a727b92c881f (diff) | |
download | setupdesign-13e0225dad0a25f6865f0fab308309c3749ac957.tar.gz |
Import updated Android Setupdesign Library 354034477
Copied from google3/third_party/java_src/android_libs/setupdesign
Test: mm
Included changes:
- 354034477 Rename ContentStyler#applyPartnerCustomizationStyle to ap...
- 353821411 Fix the javadoc of @link
- 353804268 [SetupDesign] clean up - use "values-land-v31" folder for...
- 353709689 Update Android Lint to http://ab/7077792
- 353350644 Don't show the toast warning users to use a vector drawab...
- 353027853 [BC][Tranisition] Support transfer ActivityOptions from B...
- 352699802 [SetupDesign] Update the scroll indicator style
- 352689119 Remove unused attributes in SetupDesign library
- 352515869 [SetDesign] Support landscape mode for glif blank template
Bug:176785490
PiperOrigin-RevId: 354034477
Change-Id: If8feb1fa11cef5f2998d01c04f99953208e65a37
Diffstat (limited to 'main/res')
-rw-r--r-- | main/res/drawable/sud_scroll_bar_dark.xml (renamed from main/res/layout-v30/sud_glif_recycler_template_content_s.xml) | 18 | ||||
-rw-r--r-- | main/res/drawable/sud_scroll_bar_light.xml (renamed from main/res/layout-v30/sud_glif_template_compact_s.xml) | 18 | ||||
-rw-r--r-- | main/res/layout-land-v31/sud_glif_blank_template_content.xml | 64 | ||||
-rw-r--r-- | main/res/layout-land-v31/sud_glif_list_template_content.xml (renamed from main/res/layout-land-v30/sud_glif_list_template_content_s.xml) | 9 | ||||
-rw-r--r-- | main/res/layout-land-v31/sud_glif_preference_recycler_view.xml (renamed from main/res/layout-land-v30/sud_glif_preference_recycler_view_s.xml) | 1 | ||||
-rw-r--r-- | main/res/layout-land-v31/sud_glif_preference_template_content.xml (renamed from main/res/layout-land-v30/sud_glif_preference_template_content_s.xml) | 3 | ||||
-rw-r--r-- | main/res/layout-land-v31/sud_glif_recycler_template_content.xml (renamed from main/res/layout-land-v30/sud_glif_recycler_template_content_s.xml) | 9 | ||||
-rw-r--r-- | main/res/layout-land-v31/sud_glif_template_content.xml (renamed from main/res/layout-land-v30/sud_glif_template_content_s.xml) | 9 | ||||
-rw-r--r-- | main/res/layout-v30/sud_glif_preference_recycler_view_s.xml | 27 | ||||
-rw-r--r-- | main/res/layout-v30/sud_glif_preference_template_compact_s.xml | 27 | ||||
-rw-r--r-- | main/res/layout-v30/sud_glif_recycler_template_compact_s.xml | 26 | ||||
-rw-r--r-- | main/res/layout-v30/sud_glif_template_content_s.xml | 9 | ||||
-rw-r--r-- | main/res/layout-v31/sud_glif_preference_template_compact.xml (renamed from main/res/layout-v30/sud_glif_list_template_compact_s.xml) | 4 | ||||
-rw-r--r-- | main/res/layout-v31/sud_glif_preference_template_content.xml (renamed from main/res/layout-v30/sud_glif_preference_template_content_s.xml) | 2 | ||||
-rw-r--r-- | main/res/values-sw600dp/dimens.xml | 6 | ||||
-rw-r--r-- | main/res/values-v30/layouts.xml | 44 | ||||
-rw-r--r-- | main/res/values-v31/layouts.xml (renamed from main/res/layout-v30/sud_glif_list_template_content_s.xml) | 10 | ||||
-rw-r--r-- | main/res/values/attrs.xml | 5 | ||||
-rw-r--r-- | main/res/values/dimens.xml | 8 | ||||
-rw-r--r-- | main/res/values/styles.xml | 12 |
20 files changed, 103 insertions, 208 deletions
diff --git a/main/res/layout-v30/sud_glif_recycler_template_content_s.xml b/main/res/drawable/sud_scroll_bar_dark.xml index 2572197..fbfce55 100644 --- a/main/res/layout-v30/sud_glif_recycler_template_content_s.xml +++ b/main/res/drawable/sud_scroll_bar_dark.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project @@ -6,7 +6,7 @@ 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 + 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, @@ -15,12 +15,8 @@ limitations under the License. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - - <include layout="@layout/sud_glif_recycler_template_content" /> - -</LinearLayout> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#33FFFFFF" /> + <corners android:radius="2dp" /> +</shape> diff --git a/main/res/layout-v30/sud_glif_template_compact_s.xml b/main/res/drawable/sud_scroll_bar_light.xml index 0e1e6a4..ad32634 100644 --- a/main/res/layout-v30/sud_glif_template_compact_s.xml +++ b/main/res/drawable/sud_scroll_bar_light.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project @@ -6,7 +6,7 @@ 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 + 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, @@ -15,12 +15,8 @@ limitations under the License. --> -<com.google.android.setupcompat.view.StatusBarBackgroundLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/suc_layout_status" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <include layout="@layout/sud_glif_template_content_s" /> - -</com.google.android.setupcompat.view.StatusBarBackgroundLayout> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="#33000000" /> + <corners android:radius="2dp" /> +</shape> 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 new file mode 100644 index 0000000..c8e49d6 --- /dev/null +++ b/main/res/layout-land-v31/sud_glif_blank_template_content.xml @@ -0,0 +1,64 @@ +<?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" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:orientation="horizontal"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical"> + + <ViewStub + android:id="@+id/sud_layout_sticky_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </LinearLayout> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical"> + + <FrameLayout + android:id="@+id/sud_layout_content" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> + + </LinearLayout> + + </LinearLayout> + + <ViewStub + android:id="@+id/suc_layout_footer" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + +</LinearLayout> diff --git a/main/res/layout-land-v30/sud_glif_list_template_content_s.xml b/main/res/layout-land-v31/sud_glif_list_template_content.xml index 4e6a228..8352a2d 100644 --- a/main/res/layout-land-v30/sud_glif_list_template_content_s.xml +++ b/main/res/layout-land-v31/sud_glif_list_template_content.xml @@ -17,7 +17,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> @@ -44,8 +43,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - android:scrollbarThumbVertical="@null" - android:scrollbarThumbHorizontal="@null"> + android:scrollIndicators="?attr/sudScrollIndicators"> <include layout="@layout/sud_glif_header" /> @@ -59,16 +57,13 @@ android:layout_weight="1" android:orientation="vertical"> - <!-- Ignore UnusedAttribute: scrollIndicators is new in M. Default to no indicators in - older versions. --> <com.google.android.setupdesign.view.StickyHeaderListView xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" - android:scrollIndicators="?attr/sudScrollIndicators" - tools:ignore="UnusedAttribute" /> + android:scrollIndicators="?attr/sudScrollIndicators" /> </LinearLayout> diff --git a/main/res/layout-land-v30/sud_glif_preference_recycler_view_s.xml b/main/res/layout-land-v31/sud_glif_preference_recycler_view.xml index 241f6e5..53fac8f 100644 --- a/main/res/layout-land-v30/sud_glif_preference_recycler_view_s.xml +++ b/main/res/layout-land-v31/sud_glif_preference_recycler_view.xml @@ -15,7 +15,6 @@ limitations under the License. --> -<!-- TODO : move to "layout-land-v31" and change name to "sud_glif_preference_recycler_view_s.xml" --> <com.google.android.setupdesign.view.HeaderRecyclerView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" diff --git a/main/res/layout-land-v30/sud_glif_preference_template_content_s.xml b/main/res/layout-land-v31/sud_glif_preference_template_content.xml index 68a1171..9f41222 100644 --- a/main/res/layout-land-v30/sud_glif_preference_template_content_s.xml +++ b/main/res/layout-land-v31/sud_glif_preference_template_content.xml @@ -43,8 +43,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - android:scrollbarThumbVertical="@null" - android:scrollbarThumbHorizontal="@null"> + android:scrollIndicators="?attr/sudScrollIndicators"> <include layout="@layout/sud_glif_header" /> diff --git a/main/res/layout-land-v30/sud_glif_recycler_template_content_s.xml b/main/res/layout-land-v31/sud_glif_recycler_template_content.xml index 59f2dfd..d89d693 100644 --- a/main/res/layout-land-v30/sud_glif_recycler_template_content_s.xml +++ b/main/res/layout-land-v31/sud_glif_recycler_template_content.xml @@ -18,7 +18,6 @@ <LinearLayout 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:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> @@ -45,8 +44,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - android:scrollbarThumbVertical="@null" - android:scrollbarThumbHorizontal="@null"> + android:scrollIndicators="?attr/sudScrollIndicators"> <include layout="@layout/sud_glif_header" /> @@ -60,16 +58,13 @@ android:layout_weight="1" android:orientation="vertical"> - <!-- Ignore UnusedAttribute: scrollIndicators is new in M. Default to no indicators in - older versions. --> <com.google.android.setupdesign.view.HeaderRecyclerView android:id="@+id/sud_recycler_view" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:scrollbars="vertical" - android:scrollIndicators="?attr/sudScrollIndicators" - tools:ignore="UnusedAttribute" /> + android:scrollIndicators="?attr/sudScrollIndicators" /> </LinearLayout> diff --git a/main/res/layout-land-v30/sud_glif_template_content_s.xml b/main/res/layout-land-v31/sud_glif_template_content.xml index b9e490b..0fab9ca 100644 --- a/main/res/layout-land-v30/sud_glif_template_content_s.xml +++ b/main/res/layout-land-v31/sud_glif_template_content.xml @@ -17,7 +17,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> @@ -44,8 +43,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - android:scrollbarThumbVertical="@null" - android:scrollbarThumbHorizontal="@null"> + android:scrollIndicators="?attr/sudScrollIndicators"> <include layout="@layout/sud_glif_header" /> @@ -59,15 +57,12 @@ android:layout_weight="1" android:orientation="vertical"> - <!-- Ignore UnusedAttribute: scrollIndicators is new in M. - Default to no indicators in older versions. --> <com.google.android.setupdesign.view.BottomScrollView android:id="@+id/sud_scroll_view" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - android:scrollIndicators="?attr/sudScrollIndicators" - tools:ignore="UnusedAttribute"> + android:scrollIndicators="?attr/sudScrollIndicators"> <LinearLayout android:layout_width="match_parent" diff --git a/main/res/layout-v30/sud_glif_preference_recycler_view_s.xml b/main/res/layout-v30/sud_glif_preference_recycler_view_s.xml deleted file mode 100644 index c8c85da..0000000 --- a/main/res/layout-v30/sud_glif_preference_recycler_view_s.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?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. ---> - -<!-- TODO : remove this file to use "sud_glif_preference_recycler_view.xml" directly. --> -<com.google.android.setupdesign.view.HeaderRecyclerView - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:id="@+id/sud_recycler_view" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:clipChildren="false" - android:scrollbars="vertical" - app:sudHeader="@layout/sud_glif_header" /> diff --git a/main/res/layout-v30/sud_glif_preference_template_compact_s.xml b/main/res/layout-v30/sud_glif_preference_template_compact_s.xml deleted file mode 100644 index 4d6ccd9..0000000 --- a/main/res/layout-v30/sud_glif_preference_template_compact_s.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?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. ---> - -<com.google.android.setupcompat.view.StatusBarBackgroundLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/suc_layout_status" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <!-- TODO : change to "@layout/sud_glif_preference_template_content" --> - <include layout="@layout/sud_glif_preference_template_content_s" /> - -</com.google.android.setupcompat.view.StatusBarBackgroundLayout> diff --git a/main/res/layout-v30/sud_glif_recycler_template_compact_s.xml b/main/res/layout-v30/sud_glif_recycler_template_compact_s.xml deleted file mode 100644 index 5e4e390..0000000 --- a/main/res/layout-v30/sud_glif_recycler_template_compact_s.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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. ---> - -<com.google.android.setupcompat.view.StatusBarBackgroundLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/suc_layout_status" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <include layout="@layout/sud_glif_recycler_template_content_s" /> - -</com.google.android.setupcompat.view.StatusBarBackgroundLayout> diff --git a/main/res/layout-v30/sud_glif_template_content_s.xml b/main/res/layout-v30/sud_glif_template_content_s.xml deleted file mode 100644 index faab147..0000000 --- a/main/res/layout-v30/sud_glif_template_content_s.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - - <include layout="@layout/sud_glif_template_content" /> - -</LinearLayout>
\ No newline at end of file diff --git a/main/res/layout-v30/sud_glif_list_template_compact_s.xml b/main/res/layout-v31/sud_glif_preference_template_compact.xml index da5c143..a111e70 100644 --- a/main/res/layout-v30/sud_glif_list_template_compact_s.xml +++ b/main/res/layout-v31/sud_glif_preference_template_compact.xml @@ -21,6 +21,6 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <include layout="@layout/sud_glif_list_template_content_s" /> + <include layout="@layout/sud_glif_preference_template_content" /> -</com.google.android.setupcompat.view.StatusBarBackgroundLayout> +</com.google.android.setupcompat.view.StatusBarBackgroundLayout>
\ No newline at end of file diff --git a/main/res/layout-v30/sud_glif_preference_template_content_s.xml b/main/res/layout-v31/sud_glif_preference_template_content.xml index 870b2ba..dce2b83 100644 --- a/main/res/layout-v30/sud_glif_preference_template_content_s.xml +++ b/main/res/layout-v31/sud_glif_preference_template_content.xml @@ -23,4 +23,4 @@ <include layout="@layout/sud_glif_blank_template_content" /> -</LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/main/res/values-sw600dp/dimens.xml b/main/res/values-sw600dp/dimens.xml index 07ede4e..b7802b1 100644 --- a/main/res/values-sw600dp/dimens.xml +++ b/main/res/values-sw600dp/dimens.xml @@ -18,12 +18,10 @@ <resources> <!-- General --> - <!-- Calculated by (sud_glif_margin_sides - 4dp internal padding of button) --> + <!-- Calculated by (sud_glif_margin_start - 4dp internal padding of button) --> <dimen name="sud_glif_button_margin_end">36dp</dimen> - <!-- Calculated by (sud_glif_margin_sides - sud_glif_button_padding) --> + <!-- Calculated by (sud_glif_margin_start - sud_glif_button_padding) --> <dimen name="sud_glif_button_margin_start">24dp</dimen> - <!-- TODO: Remove it when all apps being used migrate into a new dimension. --> - <dimen name="sud_glif_margin_sides">40dp</dimen> <dimen name="sud_glif_margin_start">40dp</dimen> <dimen name="sud_glif_margin_end">40dp</dimen> diff --git a/main/res/values-v30/layouts.xml b/main/res/values-v30/layouts.xml deleted file mode 100644 index c966fd3..0000000 --- a/main/res/values-v30/layouts.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?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 xmlns:tools="http://schemas.android.com/tools"> - - <!-- template for SDK S+, it provides for new template layout for landscape mode and keeps unchanged for the portrait layout. --> - <!-- TODO : Use "values-land-v31" folder directly when SDK & S device ready. - - delete "sud_glif_template_s" & "sud_glif_template_compact_s" - - move "sud_glif_template_content_s" into "values-land-v31" --> - <item name="sud_glif_template_s" type="layout">@layout/sud_glif_template_compact_s</item> - - <!-- TODO : Use "values-land-v31" folder directly when SDK & S device ready. - - delete the item "sud_glif_recycler_template_s" & the file "sud_glif_recycler_template_compact_s.xml" - - move "sud_glif_recycler_template_content_s.xml" into "values-land-v31" and rename to "sud_glif_recycler_template_content.xml" --> - <item name="sud_glif_recycler_template_s" type="layout">@layout/sud_glif_recycler_template_compact_s</item> - - <!-- TODO : Use "values-land-v31" folder directly when SDK & S device ready. - - delete the item "sud_glif_list_template_s" & the file "sud_glif_list_template_compact_s.xml" - - move "sud_glif_list_template_content_s.xml" into "layout-land-v31" and rename to "sud_glif_list_template_content.xml" --> - <item name="sud_glif_list_template_s" type="layout">@layout/sud_glif_list_template_compact_s</item> - - <!-- TODO : Use "values-land-v31" folder directly when SDK & S device ready. - - move the item "sud_glif_preference_template_s" & the content "sud_glif_preference_template_compact_s" into the file "values-v31/layouts.xml", - change itme name to "sud_glif_preference_template" & the content name to "sud_glif_preference_template_compact" - - move "/layout-land-v30/sud_glif_preference_template_content_s.xml" into "layout-land-v31" and rename to "sud_glif_preference_template_content.xml" - - move "/layout-v30/sud_glif_preference_template_compact_s.xml" into "layout-land-v31" and rename to "sud_glif_preference_template_compact.xml" --> - <item name="sud_glif_preference_template_s" type="layout">@layout/sud_glif_preference_template_compact_s</item> - -</resources> - diff --git a/main/res/layout-v30/sud_glif_list_template_content_s.xml b/main/res/values-v31/layouts.xml index d88233b..e6198e8 100644 --- a/main/res/layout-v30/sud_glif_list_template_content_s.xml +++ b/main/res/values-v31/layouts.xml @@ -15,12 +15,8 @@ limitations under the License. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> +<resources xmlns:tools="http://schemas.android.com/tools"> - <include layout="@layout/sud_glif_list_template_content" /> + <item name="sud_glif_preference_template" type="layout">@layout/sud_glif_preference_template_compact</item> -</LinearLayout> +</resources> diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml index 83d10a7..865fc1e 100644 --- a/main/res/values/attrs.xml +++ b/main/res/values/attrs.xml @@ -19,8 +19,6 @@ <!-- Theme attributes --> <attr name="sudLayoutTheme" format="reference" /> - <!-- TODO: Remove it when all attributes being used migrated into new one. --> - <attr name="sudMarginSides" format="dimension|reference" /> <attr name="sudMarginStart" format="dimension|reference" /> <attr name="sudMarginEnd" format="dimension|reference" /> <attr name="sudEditTextBackgroundColor" format="color" /> @@ -103,6 +101,9 @@ <flag name="end" value="0x20" /> </attr> + <!-- Custom the scroll bar indicator --> + <attr name="sudScrollBarThumb" format="reference" /> + <!-- Custom view attributes --> <attr name="sudColorPrimary" format="color" /> <attr name="sudHeader" format="reference" /> diff --git a/main/res/values/dimens.xml b/main/res/values/dimens.xml index f3b45b1..aa2c16c 100644 --- a/main/res/values/dimens.xml +++ b/main/res/values/dimens.xml @@ -21,20 +21,18 @@ <dimen name="sud_layout_margin_sides">40dp</dimen> <dimen name="sud_glif_button_corner_radius">2dp</dimen> - <!-- Calculated by (sud_glif_margin_sides - 4dp internal padding of button) --> + <!-- Calculated by (sud_glif_margin_start - 4dp internal padding of button) --> <dimen name="sud_glif_button_margin_end">20dp</dimen> - <!-- Calculated by (sud_glif_margin_sides - sud_glif_button_padding) --> + <!-- Calculated by (sud_glif_margin_start - sud_glif_button_padding) --> <dimen name="sud_glif_button_margin_start">8dp</dimen> <dimen name="sud_glif_button_padding">16dp</dimen> <!-- 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) --> + <!-- Calculated by (sud_glif_margin_end - 4dp internal padding of button) --> <dimen name="sud_glif_footer_padding_end">20dp</dimen> <dimen name="sud_glif_footer_min_height">72dp</dimen> - <!-- TODO: Remove it when all apps being used migrate into a new dimension. --> - <dimen name="sud_glif_margin_sides">24dp</dimen> <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> diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml index 5e26ce9..75e74f1 100644 --- a/main/res/values/styles.xml +++ b/main/res/values/styles.xml @@ -51,8 +51,6 @@ <item name="sudItemDescriptionStyle">@style/SudItemContainer.Description</item> <item name="sudItemDescriptionTitleStyle">@style/SudItemTitle</item> <item name="sudListItemIconColor">@color/sud_list_item_icon_color_dark</item> - <!-- TODO: Remove it when all attributes being used migrated into new one. --> - <item name="sudMarginSides">@dimen/sud_layout_margin_sides</item> <item name="sudMarginStart">@dimen/sud_layout_margin_sides</item> <item name="sudMarginEnd">@dimen/sud_layout_margin_sides</item> <item name="sudNavBarTheme">@style/SudNavBarThemeDark</item> @@ -91,8 +89,6 @@ <item name="sudItemDescriptionStyle">@style/SudItemContainer.Description</item> <item name="sudItemDescriptionTitleStyle">@style/SudItemTitle</item> <item name="sudListItemIconColor">@color/sud_list_item_icon_color_light</item> - <!-- TODO: Remove it when all attributes being used migrated into new one. --> - <item name="sudMarginSides">@dimen/sud_layout_margin_sides</item> <item name="sudMarginStart">@dimen/sud_layout_margin_sides</item> <item name="sudMarginEnd">@dimen/sud_layout_margin_sides</item> <item name="sudNavBarTheme">@style/SudNavBarThemeLight</item> @@ -115,6 +111,7 @@ <item name="android:windowDisablePreview">true</item> <item name="android:windowSoftInputMode">adjustResize</item> <item name="android:colorError" tools:targetApi="26">@color/sud_color_error_text_dark</item> + <item name="android:scrollbarThumbVertical">?attr/sudScrollBarThumb</item> <item name="colorAccent">@color/sud_color_accent_glif_dark</item> <item name="colorPrimary">?attr/colorAccent</item> @@ -144,11 +141,10 @@ <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> - <!-- TODO: Remove it when all attributes being used migrated into new one. --> - <item name="sudMarginSides">@dimen/sud_glif_margin_sides</item> <item name="sudMarginStart">@dimen/sud_glif_margin_start</item> <item name="sudMarginEnd">@dimen/sud_glif_margin_end</item> <item name="sudScrollIndicators">bottom</item> + <item name="sudScrollBarThumb">@drawable/sud_scroll_bar_dark</item> <item name="textAppearanceListItem">@style/TextAppearance.SudGlifItemTitle</item> <item name="textAppearanceListItemSmall">@style/TextAppearance.SudGlifItemSummary</item> <item name="sucFooterBarButtonFontFamily">?attr/sudButtonFontFamily</item> @@ -183,6 +179,7 @@ <item name="android:windowDisablePreview">true</item> <item name="android:windowSoftInputMode">adjustResize</item> <item name="android:colorError" tools:targetApi="26">@color/sud_color_error_text_light</item> + <item name="android:scrollbarThumbVertical">?attr/sudScrollBarThumb</item> <item name="colorAccent">@color/sud_color_accent_glif_light</item> <item name="colorPrimary">?attr/colorAccent</item> @@ -212,11 +209,10 @@ <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> - <!-- TODO: Remove it when all attributes being used migrated into new one. --> - <item name="sudMarginSides">@dimen/sud_glif_margin_sides</item> <item name="sudMarginStart">@dimen/sud_glif_margin_start</item> <item name="sudMarginEnd">@dimen/sud_glif_margin_end</item> <item name="sudScrollIndicators">bottom</item> + <item name="sudScrollBarThumb">@drawable/sud_scroll_bar_light</item> <item name="textAppearanceListItem">@style/TextAppearance.SudGlifItemTitle</item> <item name="textAppearanceListItemSmall">@style/TextAppearance.SudGlifItemSummary</item> <item name="sucFooterBarButtonFontFamily">?attr/sudButtonFontFamily</item> |