LinearProgressIndicator: Fixes for new M3 design
* Since 1.12.0, LinearProgressIndicator uses new M3 design that doesn't plays well with install and ratings for us * Switch both back to old style using new Widget.Material3.LinearProgressIndicator.Legacy style * Additionally drop trackCornerRadius and switch to custom background with clipToOutline for download as the class now has a bug that messes with style Keep downloads to follow new M3 design Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -237,6 +237,7 @@ class AppDetailsFragment : BaseFragment(R.layout.fragment_details) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Downloads
|
// Downloads
|
||||||
|
binding.layoutDetailsInstall.progressDownload.clipToOutline = true
|
||||||
binding.layoutDetailsInstall.imgCancel.setOnClickListener {
|
binding.layoutDetailsInstall.imgCancel.setOnClickListener {
|
||||||
viewModel.cancelDownload(app)
|
viewModel.cancelDownload(app)
|
||||||
if (downloadStatus != DownloadStatus.DOWNLOADING) flip(0)
|
if (downloadStatus != DownloadStatus.DOWNLOADING) flip(0)
|
||||||
|
|||||||
5
app/src/main/res/drawable/bg_rounded_transparent.xml
Normal file
5
app/src/main/res/drawable/bg_rounded_transparent.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
||||||
@@ -62,15 +62,16 @@
|
|||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progress_download"
|
android:id="@+id/progress_download"
|
||||||
|
style="@style/Widget.Material3.LinearProgressIndicator.Legacy"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toStartOf="@id/img_cancel"
|
android:layout_toStartOf="@id/img_cancel"
|
||||||
|
android:background="@drawable/bg_rounded_transparent"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:indeterminateTint="@color/colorScrimAlt"
|
android:indeterminateTint="@color/colorScrimAlt"
|
||||||
app:indicatorColor="@color/colorScrimAlt"
|
app:indicatorColor="@color/colorScrimAlt"
|
||||||
app:trackColor="@color/colorScrim"
|
app:trackColor="@color/colorScrim"
|
||||||
app:trackCornerRadius="10dp"
|
|
||||||
app:trackThickness="@dimen/icon_size_small" />
|
app:trackThickness="@dimen/icon_size_small" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/avg_rating"
|
android:id="@+id/avg_rating"
|
||||||
|
style="@style/Widget.Material3.LinearProgressIndicator.Legacy"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user