How to implement a material design circular progress bar in android

前端 未结 8 850
小鲜肉
小鲜肉 2020-12-07 15:35

I want to make a material design circular progress bar like the one in Inbox by Gmail android app. How do I achieve this (in pre-lollipop devices)?

Am trying to achie

相关标签:
8条回答
  • 2020-12-07 16:20
    <ProgressBar
    android:id="@+id/loading_spinner"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:indeterminateTintMode="src_atop"
    android:indeterminateTint="@color/your_customized_color"
    android:layout_gravity="center" />
    

    The effect looks like this:

    img

    0 讨论(0)
  • 2020-12-07 16:24

    I've backported the three Material Design progress drawables to Android 4.0, which can be used as a drop-in replacement for regular ProgressBar, with exactly the same appearance.

    These drawables also backported the tinting APIs (and RTL support), and uses ?colorControlActivated as the default tint. A MaterialProgressBar widget which extends ProgressBar has also been introduced for convenience.

    DreaminginCodeZH/MaterialProgressBar

    This project has also been adopted by afollestad/material-dialogs for progress dialog.

    On Android 4.4.4:

    On Android 5.1.1:

    0 讨论(0)
提交回复
热议问题