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