SUW: update TV theming for 12

* setupdesign now uses a layout-land
* Rearrange welcome activity
* Add a padding of 56dp for each activity based on
  external/setupdesign/main/res/values/dimens.xml
  ´sud_glif_icon_margin_top´

Change-Id: I77ec3d1c3d62a66aeb76233eccafbea96804e701
This commit is contained in:
Timi Rautamäki
2022-01-14 21:55:13 +00:00
parent 3ca81566d1
commit b416c33ab6
5 changed files with 81 additions and 65 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2016 The CyanogenMod Project Copyright (C) 2016 The CyanogenMod Project
Copyright (C) 2017-2021 The LineageOS Project 2017-2022 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -15,78 +15,72 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<com.google.android.setupdesign.GlifLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/setup_wizard_layout" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
style="@style/SudContentFrame">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
style="@style/SudContentFrame"> android:gravity="center_vertical"
android:weightSum="100"
android:orientation="vertical">
<LinearLayout <ImageView
android:layout_width="match_parent" android:id="@+id/brand_logo"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:gravity="center_vertical" android:layout_height="0dp"
android:weightSum="100" android:layout_weight="80"
android:orientation="vertical"> android:layout_gravity="center"
android:src="@drawable/logo"
<ImageView android:adjustViewBounds="true"
android:id="@+id/brand_logo" android:scaleType="fitCenter"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="80"
android:layout_gravity="center"
android:src="@drawable/logo"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:gravity="center"
android:padding="@dimen/content_margin_left" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="20"
android:gravity="center_vertical"
android:orientation="vertical">
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/start"
style="@style/SudGlifButton.Primary" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center" android:gravity="center"
android:visibility="gone"> android:padding="@dimen/content_margin_left" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="20"
android:gravity="center_vertical"
android:orientation="vertical">
<Button <Button
android:id="@+id/emerg_dialer" android:id="@+id/start"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_dialer" android:layout_gravity="center"
android:text="@string/emergency_call" android:text="@string/start"
style="@style/SudGlifButton.Secondary" /> style="@style/SudGlifButton.Primary" />
<Button
android:id="@+id/launch_accessibility"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_eye"
android:text="@string/accessibility_settings"
style="@style/SudGlifButton.Secondary" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</com.google.android.setupdesign.GlifLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:visibility="gone">
<Button
android:id="@+id/emerg_dialer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_dialer"
android:text="@string/emergency_call"
style="@style/SudGlifButton.Secondary" />
<Button
android:id="@+id/launch_accessibility"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_eye"
android:text="@string/accessibility_settings"
style="@style/SudGlifButton.Secondary" />
</LinearLayout>
</LinearLayout>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2015 The CyanogenMod Project Copyright (C) 2015 The CyanogenMod Project
Copyright (C) 2017-2021 The LineageOS Project 2017-2022 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -26,7 +26,8 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
style="@style/SudContentFrame"> style="@style/SudContentFrame"
android:layout_marginTop="@dimen/base_margin_top">
<FrameLayout <FrameLayout
android:id="@+id/page" android:id="@+id/page"

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The LineageOS 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>
<dimen name="base_margin_top">56dp</dimen>
</resources>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2021 The LineageOS Project Copyright (C) 2021-2022 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -15,5 +15,5 @@
limitations under the License. limitations under the License.
--> -->
<resources> <resources>
<style name="Theme.Setup" parent="SudThemeGlifV3.DayNight" /> <style name="Theme.Setup" parent="SudDynamicColorThemeGlifV3.DayNight" />
</resources> </resources>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2013 The CyanogenMod Project Copyright (C) 2013 The CyanogenMod Project
2017-2022 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -35,4 +36,5 @@
<dimen name="carrier_text_margin_left">15dp</dimen> <dimen name="carrier_text_margin_left">15dp</dimen>
<dimen name="setup_line_spacing">3sp</dimen> <dimen name="setup_line_spacing">3sp</dimen>
<dimen name="min_locale_picker_height">100dp</dimen> <dimen name="min_locale_picker_height">100dp</dimen>
<dimen name="base_margin_top">0dp</dimen>
</resources> </resources>