3

I have used the this link for progress bar animation, which works fine on all devices except Sony Xperia. Please tell me the solution for the same. Didn't found any.

Call the progress bar animation like below:

ProgressBarAnimation anim = new ProgressBarAnimation(progress, from, to);
anim.setDuration(1000);
progress.startAnimation(anim);

This is the same way I actually implemented which is working fine on nexus 6, Samsung phones, but not working on Sony Xperia.

<ProgressBar
    android:id="@+id/progressBar"
    android:layout_width="@dimen/pBar_ht_wd"
    android:layout_height="@dimen/pBar_ht_wd"
    android:layout_centerInParent="true"
    android:layout_marginTop="@dimen/pb_mg_top"
    android:visibility="visible"
    style="?android:attr/progressBarStyleHorizontal"
    android:progressDrawable="@drawable/custom_circular_bar"
    android:progress="75"
    android:max="100"
    android:secondaryProgress="100"
    android:useLevel="true"/>

I want to have below result in the progress bar:

Image link

Community
  • 1
  • 1
Neha
  • 135
  • 1
  • 7
  • 1
    *does not work* is not enough to describe a programming problem, you need to include stacktraces + excepted and actual behavior. All relevant code should be included in the question itself. – 2Dee Sep 02 '15 at 09:03
  • please check the edit, code has been added to show the animation in progress bar. If you know the solution please help me on this. Thanks – Neha Sep 02 '15 at 09:21
  • I have the same problem and for me "does not work" is fair enough explanation for progressdialog, afterall it's not rocket science. It shows but it doesnt run animation. – ozapa Mar 16 '16 at 16:25

2 Answers2

2

Yes, I know my question has marked negative, but if anyone face the same problem, use the github liberary from the below link:

CustomProgressView

Neha
  • 135
  • 1
  • 7
1

In some of the devices, animations were disabled. Check if animations are enabled in developer settings in your device.

Suraksha Ajith
  • 872
  • 2
  • 12
  • 23