'Material3 CircularProgressIndicator not working in Mi11x Pro
Hi I am using android material 3, I try to show Progress Indicator as per google guidelines https://github.com/material-components/material-components-android/blob/master/docs/components/ProgressIndicator.md
// Material Design 3 implementation 'com.google.android.material:material:1.7.0-alpha01'
The progress indicator is not showing in mi 11x pro but it is working on other devices
<com.google.android.material.progressindicator.CircularProgressIndicator
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true" />
Here is my full code
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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="match_parent"
android:fitsSystemWindows="true"
android:background="#e6e6e6"
>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:theme="@style/Theme.ShoppingCart"
app:elevation="0dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginHorizontal="@dimen/spacing_mlarge"
android:layout_marginBottom="@dimen/spacing_middle"
android:text="Tek Shop"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:textColor="@color/grey_60"
android:textStyle="bold"
app:layout_scrollFlags="scroll|enterAlways" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/spacing_mlarge"
android:layout_marginBottom="@dimen/spacing_middle"
android:text="Quality products at affordable price."
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/grey_60"
app:layout_scrollFlags="scroll|enterAlways" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:background="@android:color/transparent"
app:tabBackground="@android:color/transparent"
app:tabGravity="fill"
app:tabIndicator="@drawable/shape_round_corner"
app:tabIndicatorColor="@color/red_A200"
app:tabIndicatorFullWidth="false"
app:tabIndicatorGravity="bottom"
app:tabIndicatorHeight="@dimen/spacing_medium"
app:tabMode="scrollable"
app:tabRippleColor="@android:color/transparent"
app:tabSelectedTextColor="@color/red_A200"
app:tabTextAppearance="@style/TextAppearance.AppCompat.Subhead"
app:tabTextColor="@color/grey_40">
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="true"
android:id="@+id/recyclerView"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<!-- Circular progress indicator -->
<com.google.android.material.progressindicator.CircularProgressIndicator
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
How to fix this issue?
- the app does not show a progress indicator
- the app does not show any error or crash - issue happens only mi 11 x pro
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|