Whatsapp喜欢CircularProgressBar

时间:2017-01-12 13:18:17

标签: android

是否有任何库,其功能为 WhatsApp ,例如循环ProgressBar ,用于上传或下载图片?

1 个答案:

答案 0 :(得分:1)

试试这个:

<ProgressBar
        android:id="@+id/circular_progress_bar"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_marginTop="30dp"
        android:indeterminate="false"
        android:max="48"
        android:progress="1"
        android:progressDrawable="@drawable/circular_progressbar"/>\

代码:

mprogressBar = (ProgressBar) findViewById(R.id.circular_progress_bar);
ObjectAnimator anim = ObjectAnimator.ofInt(mprogressBar, "progress", 0, 100);
anim.setDuration(15000);
anim.setInterpolator(new DecelerateInterpolator());
anim.start();

enter image description here