android progressbar indeterminate horizontal

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

    链接地址: http://www.djcxy.com/p/47434.html

    上一篇: 设计回调

    下一篇: android progressbar不确定水平