Updater: Align with Settings / Materialize

* Better integrate with Settings by changing the background
  so it matches the Toolbar - one solid background
* Make updates distinct cards with rounded border and
  add spacing between them

Change-Id: If9c649f63e9bb3762f2ae272c96f5e62e0821e46
This commit is contained in:
Michael W
2023-06-18 14:01:26 +02:00
committed by Nolen Johnson
parent bf1646fa93
commit c3093cb4cc
6 changed files with 33 additions and 19 deletions

View File

@@ -31,7 +31,7 @@
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="56sp" android:textSize="56sp"
tools:text="LineageOS\n18.1" /> tools:text="LineageOS\n20" />
<TextView <TextView
android:id="@+id/header_build_version" android:id="@+id/header_build_version"
@@ -39,7 +39,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="14sp" android:textSize="14sp"
tools:text="Android 11"/> tools:text="Android 13"/>
<TextView <TextView
android:id="@+id/header_build_date" android:id="@+id/header_build_date"
@@ -47,7 +47,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="14sp" android:textSize="14sp"
tools:text="2022-01-01"/> tools:text="1970-01-01"/>
<TextView <TextView
android:id="@+id/header_last_check" android:id="@+id/header_last_check"
@@ -55,7 +55,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="14sp" android:textSize="14sp"
tools:text="Last checked: 2022-01-01"/> tools:text="Last checked: 1970-01-01"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@@ -116,7 +116,8 @@
android:clipToPadding="false" android:clipToPadding="false"
android:paddingBottom="5dp" android:paddingBottom="5dp"
android:scrollbars="vertical" android:scrollbars="vertical"
android:layout_gravity="end" /> android:layout_gravity="end"
tools:listitem="@layout/update_item_view"/>
<ProgressBar <ProgressBar
android:id="@+id/refresh_progress" android:id="@+id/refresh_progress"

View File

@@ -8,8 +8,11 @@
android:focusable="true" android:focusable="true"
android:foreground="?attr/selectableItemBackground" android:foreground="?attr/selectableItemBackground"
android:nextFocusRight="@+id/update_action" android:nextFocusRight="@+id/update_action"
android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:cardBackgroundColor="@color/tv_card_background" app:cardBackgroundColor="@color/tv_card_background"
app:cardCornerRadius="0dp" app:cardCornerRadius="16dp"
app:contentPadding="16dp"> app:contentPadding="16dp">
<LinearLayout <LinearLayout
@@ -82,7 +85,7 @@
android:ellipsize="marquee" android:ellipsize="marquee"
android:singleLine="true" android:singleLine="true"
android:visibility="invisible" android:visibility="invisible"
tools:text="162 of 300 MB (3 minutes left)" tools:text="162 of 1.1GB (3 minutes left)"
tools:visibility="visible" /> tools:visibility="visible" />
<TextView <TextView

View File

@@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_container" android:id="@+id/main_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -53,7 +54,8 @@
android:fontFamily="sans-serif-light" android:fontFamily="sans-serif-light"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="56sp" /> android:textSize="56sp"
tools:text="LineageOS\n20"/>
<TextView <TextView
android:id="@+id/header_build_version" android:id="@+id/header_build_version"
@@ -61,7 +63,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/header_title" android:layout_below="@id/header_title"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="12sp" /> android:textSize="12sp"
tools:text="Android 13"/>
<TextView <TextView
android:id="@+id/header_build_date" android:id="@+id/header_build_date"
@@ -69,7 +72,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/header_build_version" android:layout_below="@id/header_build_version"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="12sp" /> android:textSize="12sp"
tools:text="1970-01-01"/>
<TextView <TextView
android:id="@+id/header_last_check" android:id="@+id/header_last_check"
@@ -78,7 +82,8 @@
android:layout_below="@id/header_build_date" android:layout_below="@id/header_build_date"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="12sp" /> android:textSize="12sp"
tools:text="Last checked: 1970-01-01"/>
</RelativeLayout> </RelativeLayout>
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
@@ -113,5 +118,6 @@
android:clipToPadding="false" android:clipToPadding="false"
android:paddingBottom="5dp" android:paddingBottom="5dp"
android:scrollbars="vertical" android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:listitem="@layout/update_item_view" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -8,7 +8,10 @@
android:focusable="true" android:focusable="true"
android:foreground="?attr/selectableItemBackground" android:foreground="?attr/selectableItemBackground"
android:nextFocusRight="@+id/update_action" android:nextFocusRight="@+id/update_action"
app:cardCornerRadius="0dp" android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:cardCornerRadius="16dp"
app:contentPadding="16dp"> app:contentPadding="16dp">
<LinearLayout <LinearLayout
@@ -34,7 +37,7 @@
android:paddingBottom="8sp" android:paddingBottom="8sp"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp" android:textSize="16sp"
tools:text="LineageOS 15.1" /> tools:text="LineageOS 20" />
<TextView <TextView
android:id="@+id/build_date" android:id="@+id/build_date"
@@ -42,7 +45,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
android:textSize="14sp" android:textSize="14sp"
tools:text="29 February 2018" /> tools:text="18 June 2023" />
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -81,7 +84,7 @@
android:ellipsize="marquee" android:ellipsize="marquee"
android:singleLine="true" android:singleLine="true"
android:visibility="invisible" android:visibility="invisible"
tools:text="162 of 300 MB (3 minutes left)" tools:text="162 of 1.1 GB (3 minutes left)"
tools:visibility="visible" /> tools:visibility="visible" />
<TextView <TextView
@@ -90,7 +93,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="8sp" android:paddingTop="8sp"
android:singleLine="true" android:singleLine="true"
tools:text="300 MB" tools:text="1.1 GB"
tools:visibility="invisible" /> tools:visibility="invisible" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
@@ -110,6 +113,7 @@
<Button <Button
android:id="@id/update_action" android:id="@id/update_action"
style="@style/Widget.AppCompat.Button.Borderless.Colored" style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="?android:selectableItemBackgroundBorderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp" android:padding="8dp"

View File

@@ -3,7 +3,7 @@
<color name="theme_primary">#212121</color> <color name="theme_primary">#212121</color>
<color name="theme_primary_dark">#1c1c1c</color> <color name="theme_primary_dark">#1c1c1c</color>
<color name="theme_accent">@*android:color/accent_device_default_dark</color> <color name="theme_accent">@*android:color/accent_device_default_dark</color>
<color name="background">@*android:color/system_neutral1_800</color> <color name="background">@android:color/system_neutral1_900</color>
<color name="toolbar_collapsed">@android:color/system_neutral1_700</color> <color name="toolbar_collapsed">@android:color/system_neutral1_700</color>
<color name="inverted">#f5f5f5</color> <color name="inverted">#f5f5f5</color>

View File

@@ -3,7 +3,7 @@
<color name="theme_primary">#f5f5f5</color> <color name="theme_primary">#f5f5f5</color>
<color name="theme_primary_dark">#e0e0e0</color> <color name="theme_primary_dark">#e0e0e0</color>
<color name="theme_accent">@*android:color/accent_device_default_light</color> <color name="theme_accent">@*android:color/accent_device_default_light</color>
<color name="background">@*android:color/system_neutral1_0</color> <color name="background">@android:color/system_neutral1_50</color>
<color name="toolbar_collapsed">@android:color/system_neutral1_100</color> <color name="toolbar_collapsed">@android:color/system_neutral1_100</color>
<color name="tv_background">#FF0E0E0F</color> <color name="tv_background">#FF0E0E0F</color>
<color name="tv_card_background">#222222</color> <color name="tv_card_background">#222222</color>