question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Circular progress indicator] Does not work on API 22 only

See original GitHub issue

Description: Inflate and put an indeterminate circular spinning indicator programmatically in a layout and try to start the app. For the record I’ve set it as the actionview for a menu, but I bet it’s the same for every other case.

Expected behavior: The progress indicator should be visible and spinning. This is not the case on API 22, where the progress indicator doesn’t spin at all. From my tests it works on API 19,21,23,24,29 and doesn’t work on API 22 only.

Source code: loading.xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

<com.google.android.material.progressindicator.CircularProgressIndicator
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:layout_margin="10dp"
        android:indeterminate="true"
        app:indicatorColor="@color/zero_one_state"
        app:indicatorSize="20dp"
        app:trackThickness="3dp" />
</LinearLayout>

Main class:

@Override
public boolean onCreateOptionsMenu(Menu menu) { 
    menu.findItem(R.id.item).setActionView(R.layout.loading);
}

Android API version: 22

Material Library version: 1.3.0-rc01 - 1.3.0 stable - 1.4.0-alpha02 - 1.4.0 stable - … - 1.6.0 alpha01 - 1.7.0-alpha01

Device: Emulator x86 or x86_64

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
khukuh123commented, Aug 10, 2021

I have the same issue on API 22 and I’m using version 1.4.0 stable

0reactions
Massi-Xcommented, May 2, 2022

Thank you! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Displaying CircularProgressIndicator() will not stop after API ...
Displaying CircularProgressIndicator() will not stop after API call is completed ; ): Invalid argument(s) (input): Must not be null ; ): [ERROR: ...
Read more >
CircularProgressIndicator class - material library - Dart API
A widget that shows progress along a circle. There are two kinds of circular progress indicators: ... The indicator arc is displayed with...
Read more >
ProgressBar - Android Developers
Use indeterminate mode for the progress bar when you do not know how long an ... to ONLY indeterminate mode (state-keeping progress mode...
Read more >
Loading with Circular Progress Bar (Jetpack Compose)
The BEST android courses in the world: ... Your browser can't play this video. ... Loading with Circular Progress Bar (Jetpack Compose).
Read more >
Material Design Progress Bar | Android Programming Basics
In this video I have explained how to create Indeterminate and Determinate Progress Indicators in Android Studio. Explained material design ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found