mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 10:21:52 +01:00
Replace circular ProgressBars with Material component
This commit is contained in:
parent
a8e536478c
commit
eaccfdde59
@ -247,7 +247,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
recycler.setHasFixedSize(true)
|
recycler.setHasFixedSize(true)
|
||||||
recycler.adapter = adapter
|
recycler.adapter = adapter
|
||||||
|
|
||||||
binding.catalogueView.addView(recycler, 1)
|
binding.catalogueView.addView(recycler)
|
||||||
|
|
||||||
if (oldPosition != RecyclerView.NO_POSITION) {
|
if (oldPosition != RecyclerView.NO_POSITION) {
|
||||||
recycler.layoutManager?.scrollToPosition(oldPosition)
|
recycler.layoutManager?.scrollToPosition(oldPosition)
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
android:alpha="0.75"
|
android:alpha="0.75"
|
||||||
android:background="?attr/colorSurface" />
|
android:background="?attr/colorSurface" />
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
style="?android:attr/progressBarStyleLarge"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -65,12 +65,13 @@
|
|||||||
android:text="@string/no_results_found"
|
android:text="@string/no_results_found"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="?android:attr/progressBarStyleSmall"
|
style="@style/Theme.Widget.CircularProgressIndicator.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler"
|
android:id="@+id/recycler"
|
||||||
|
@ -20,12 +20,13 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="?android:attr/progressBarStyleSmall"
|
style="@style/Theme.Widget.CircularProgressIndicator.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -15,12 +15,14 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/please_wait"
|
android:id="@+id/please_wait"
|
||||||
android:layout_width="56dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="56dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
app:indicatorSize="56dp"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<eu.kanade.tachiyomi.ui.reader.PageIndicatorTextView
|
<eu.kanade.tachiyomi.ui.reader.PageIndicatorTextView
|
||||||
|
@ -25,11 +25,11 @@
|
|||||||
android:alpha="0.75"
|
android:alpha="0.75"
|
||||||
android:background="?attr/colorSurface" />
|
android:background="?attr/colorSurface" />
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
style="?android:attr/progressBarStyleLarge"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/title_wrapper"
|
android:id="@+id/title_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -83,12 +83,13 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="?android:attr/progressBarStyleSmall"
|
style="@style/Theme.Widget.CircularProgressIndicator.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -101,12 +100,13 @@
|
|||||||
android:textColor="@color/md_white_1000"
|
android:textColor="@color/md_white_1000"
|
||||||
tools:text="Sample name" />
|
tools:text="Sample name" />
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="?android:attr/progressBarStyleSmall"
|
style="@style/Theme.Widget.CircularProgressIndicator.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:indeterminate="true"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -9,17 +9,16 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".ui.browse.source.browse.BrowseSourceController">
|
tools:context=".ui.browse.source.browse.BrowseSourceController" />
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="?android:attr/progressBarStyleLarge"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:visibility="gone" />
|
android:indeterminate="true"
|
||||||
|
android:visibility="gone"
|
||||||
</LinearLayout>
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<eu.kanade.tachiyomi.widget.EmptyView
|
<eu.kanade.tachiyomi.widget.EmptyView
|
||||||
android:id="@+id/empty_view"
|
android:id="@+id/empty_view"
|
||||||
|
@ -3,14 +3,17 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress_bar"
|
android:id="@+id/progress_bar"
|
||||||
style="@style/Widget.AppCompat.ProgressBar"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="24dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_gravity="center"
|
||||||
android:layout_gravity="center" />
|
android:indeterminate="true"
|
||||||
|
app:indicatorSize="24dp"
|
||||||
|
app:trackThickness="3dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/progress_message"
|
android:id="@+id/progress_message"
|
||||||
|
@ -29,14 +29,14 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<ProgressBar
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="?android:attr/progressBarStyle"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="32dp"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="32dp"
|
||||||
|
android:indeterminate="true"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
@ -225,6 +225,14 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="Theme.Widget.CircularProgressIndicator" parent="Widget.MaterialComponents.CircularProgressIndicator">
|
||||||
|
<item name="indicatorColor">?attr/colorAccent</item>
|
||||||
|
</style>
|
||||||
|
<style name="Theme.Widget.CircularProgressIndicator.Small" parent="Theme.Widget.CircularProgressIndicator">
|
||||||
|
<item name="indicatorSize">16dp</item>
|
||||||
|
<item name="trackThickness">2dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Widget.LinearProgressIndicator" parent="Widget.MaterialComponents.LinearProgressIndicator">
|
<style name="Theme.Widget.LinearProgressIndicator" parent="Widget.MaterialComponents.LinearProgressIndicator">
|
||||||
<item name="indicatorColor">?attr/colorAccent</item>
|
<item name="indicatorColor">?attr/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
||||||
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
||||||
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
||||||
|
<item name="circularProgressIndicatorStyle">@style/Theme.Widget.CircularProgressIndicator</item>
|
||||||
<item name="linearProgressIndicatorStyle">@style/Theme.Widget.LinearProgressIndicator</item>
|
<item name="linearProgressIndicatorStyle">@style/Theme.Widget.LinearProgressIndicator</item>
|
||||||
|
|
||||||
<!-- Material Dialogs -->
|
<!-- Material Dialogs -->
|
||||||
@ -160,6 +161,7 @@
|
|||||||
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
||||||
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
||||||
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
||||||
|
<item name="circularProgressIndicatorStyle">@style/Theme.Widget.CircularProgressIndicator</item>
|
||||||
<item name="linearProgressIndicatorStyle">@style/Theme.Widget.LinearProgressIndicator</item>
|
<item name="linearProgressIndicatorStyle">@style/Theme.Widget.LinearProgressIndicator</item>
|
||||||
|
|
||||||
<!-- Material Dialogs -->
|
<!-- Material Dialogs -->
|
||||||
|
Loading…
Reference in New Issue
Block a user