Have you any idea how to make a circular progress bar like the one of Google Fit application? Like the image below.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can try this Circle Progress library
NB: please always use same width and height for progress views
DonutProgress:
CircleProgress:
ArcProgress:
It's easy to create this yourself
In your layout include the following
ProgressBar
with a specific drawable (note you should get the width from dimensions instead). The max value is important here:Now create the drawable in your resources with the following shape. Play with the radius (you can use
innerRadius
instead ofinnerRadiusRatio
) and thickness values.circular (Pre Lollipop OR API Level < 21)
circular ( >= Lollipop OR API Level >= 21)
useLevel is "false" by default in API Level 21 (Lollipop) .
Start Animation
Next in your code use an
ObjectAnimator
to animate the progress field of theProgessBar
of your layout.Stop Animation
P.S. unlike examples above, it give smooth animation.