I successfully have implemented this progress

Using animation-list with resources like this:

But problem is, that i can't impement half-heighted progress with this resources.
I have tried half-heighted resources with gravity centered vertically like this:

But the result was

Android pushed this progress to bottom. Any ideas how can I center my half-heited progress? Thx in advance.
@Antoine Marques
I have tried nine-patch drawables, but i get somethink like this

And here is my animation-list:
<item android:duration="200" android:drawable="@drawable/progressbar_indeterminate1_0" />
And resource example:
The solution to your problem is wrapping your custom progress drawable inside a ScaleDrawable :
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/my_custom_progress"
android:scaleGravity="center_vertical|center_horizontal"
android:scaleHeight="100%"
android:scaleWidth="100%" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With