Update linear progressbars to new material design (#7568)

This commit is contained in:
flofriday 2025-01-17 21:48:20 +01:00 committed by GitHub
parent 476a9d2a7e
commit cc8f5b6159
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 11 additions and 52 deletions

View File

@ -68,12 +68,12 @@
</LinearLayout>
<ProgressBar
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/episodeProgress"
android:layout_width="match_parent"
android:layout_height="4dp"
android:indeterminate="false"
style="?android:attr/progressBarStyleHorizontal"
app:trackStopIndicatorSize="0dp"
tools:progress="100" />
</LinearLayout>

View File

@ -189,14 +189,14 @@
style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
tools:text="00:42:23" />
<ProgressBar
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progressBar"
android:layout_width="0dp"
android:layout_height="4dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="100"
android:layout_margin="4dp"
style="?android:attr/progressBarStyleHorizontal" />
app:trackStopIndicatorSize="0dp" />
<TextView
android:id="@+id/txtvDuration"

View File

@ -29,6 +29,7 @@
android:layout_height="wrap_content"
android:layout_margin="1px"
app:cardCornerRadius="12dp"
app:cardBackgroundColor="@android:color/transparent"
app:cardElevation="0dp">
<LinearLayout
@ -80,13 +81,13 @@
</FrameLayout>
<ProgressBar
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_gravity="bottom"
android:max="100"
style="?attr/progressBarTheme"
app:trackStopIndicatorSize="0dp"
tools:progress="50" />
</LinearLayout>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<solid android:color="#19FFFFFF"/>
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="?attr/colorAccent"/>
</shape>
</clip>
</item>
</layer-list>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<solid android:color="#19212121"/>
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="?attr/colorAccent"/>
</shape>
</clip>
</item>
</layer-list>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="dragview_background" format="reference"/>
<attr name="progressBarTheme" format="reference"/>
<attr name="action_icon_color" format="color"/>
<attr name="scrollbar_thumb" format="reference"/>
<attr name="background_color" format="color"/>

View File

@ -10,7 +10,6 @@
</style>
<style name="Theme.Base.AntennaPod.Dynamic.Light" parent="Theme.Material3.DynamicColors.Light">
<item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="background_color">@color/background_light</item>
<item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar</item>
<item name="background_elevated">@color/background_elevated_light</item>
@ -54,7 +53,6 @@
</style>
<style name="Theme.Base.AntennaPod.Dynamic.Dark" parent="Theme.Material3.DynamicColors.Dark">
<item name="progressBarTheme">@style/ProgressBarDark</item>
<item name="background_color">@color/background_darktheme</item>
<item name="background_elevated">@color/background_elevated_darktheme</item>
<item name="action_icon_color">@color/white</item>
@ -275,16 +273,6 @@
<item name="backgroundTint">@color/button_bg_selector</item>
</style>
<style name="ProgressBarLight">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item>
</style>
<style name="ProgressBarDark">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal_dark</item>
</style>
<style name="FastScrollRecyclerView" parent="android:Widget">
<item name="android:scrollbars">none</item>
<item name="fastScrollEnabled">true</item>

View File

@ -2,6 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -37,11 +38,11 @@
android:layout_height="wrap_content"
tools:text="2 GB" />
<ProgressBar
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/used_space"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal" />
app:trackStopIndicatorSize="0dp" />
</LinearLayout>