Custom undefined progress bar
I have successfully implemented this progress
Using an animation list with resources like this:
But the problem is that I cannot make semi-high progress with these resources.
I tried half-height resources with gravity centered vertically like this:
But the result was
Android has moved this move to the bottom. Any ideas how I can focus my half-forgotten progress? thanks in advance.
@Antoine Marques I tried using nine patches but I get something like this
And here is my animation list:
<item android:duration="200" android:drawable="@drawable/progressbar_indeterminate1_0" />
And a resource example:
+3
source to share
1 answer
The solution to your problem is that your custom progress can be done internally 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%" />
+1
source to share