Updater: follow TwoPanelSettings styling

Change-Id: I8d0957288fca25f1584f5ddb35c994c7ac2575f7
This commit is contained in:
Timi Rautamäki
2021-09-03 07:57:51 +00:00
parent a96d54f236
commit 81dc120f09
3 changed files with 102 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
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="wrap_content"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:nextFocusRight="@+id/update_action"
app:cardBackgroundColor="@color/tv_card_background"
app:cardCornerRadius="0dp"
app:contentPadding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/build_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.87"
android:drawablePadding="8dp"
android:maxLines="1"
android:paddingBottom="8sp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
tools:text="LineageOS 15.1" />
<TextView
android:id="@+id/build_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="14sp"
tools:text="29 February 2018" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4sp"
android:visibility="invisible"
tools:progress="65"
tools:visibility="visible" />
<TextView
android:id="@+id/progress_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/progress_bar"
android:ellipsize="marquee"
android:singleLine="true"
android:visibility="invisible"
tools:text="162 of 300 MB (3 minutes left) • 65%"
tools:visibility="visible" />
<TextView
android:id="@+id/build_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8sp"
android:singleLine="true"
tools:text="300 MB"
tools:visibility="invisible" />
</RelativeLayout>
</LinearLayout>
<Button
android:id="@id/update_action"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
tools:text="Pause" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@color/tv_background</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
</style>
</resources>

View File

@@ -3,6 +3,8 @@
<color name="theme_primary">#f5f5f5</color>
<color name="theme_primary_dark">#e0e0e0</color>
<color name="theme_accent">@*android:color/accent_device_default_light</color>
<color name="tv_background">#FF0E0E0F</color>
<color name="tv_card_background">#222222</color>
<color name="inverted">#212121</color>
<color name="ic_background">#333333</color>