4

I would like to create a horizontal indeterminate progressbar such as showed in the image. Is it possible to create it with drawable defined in xml (eg. animated-list) ?

Two variants:

  • red rectangle goes always from left to right
  • red rectangle goes from left to right and then it returns back to left

layout / my_layout.xml

<ProgressBar
    style="?android:attr/progressBarStyleHorizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:minHeight="25dp"
    android:indeterminate="true"
    android:indeterminateDrawable="@drawable/progressbar_indeterminate"/>

drawable / progressbar_indeterminate.xml

Rumit Patel
  • 8,830
  • 18
  • 51
  • 70
user3540847
  • 41
  • 1
  • 2

0 Answers0