Issue
I want a determinate circular progress bar like telegram android app but i cant find it in the project sources.
and it is rotating
Update: i am using material progress But it does not rotate in determinate mode, what i want is to rotate while loading... just like telegram app.
Solution
Create a rotate.xml in res/anim folder:
<?xml version="1.0" encoding="UTF-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1600"
android:fromDegrees="0"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:toDegrees="360" />
Load anim and run in code:
view.startAnimation(AnimationUtils.loadAnimation(activity, R.anim.rotate));
Answered By - Morteza Rastgoo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.