微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android-progressbar – 如何在Android中更改进度条图像

我想改变我的custom的进度条.如何改变形象
进度条.请帮我

解决方法

在这里我的答案,我使用我的图像在 android进度条..
<ProgressBar 
         android:layout_height="50dp" 
         android:layout_width="60dp"
         android:layout_centerInParent="true"

         android:indeterminate="true"
         android:indeterminateDrawable="@drawable/my_progress_indeterminate"/>
     </RelativeLayout>

my_progress_interminate.xml:

<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android" 
    android:drawable="@drawable/load" 
    android:pivotX="50%"
    android:pivotY="50%"

     />

animatio.xml:

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:oneshot="false">

    <item android:drawable="@drawable/load" android:duration="50" />
    <item android:drawable="@drawable/load" android:duration="50" />
    <item android:drawable="@drawable/load" android:duration="50" />
     <rotate 
         xmlns:android="http://schemas.android.com/apk/res/android" 
         android:drawable="@drawable/load" 
         android:pivotX="50%" 
         android:pivotY="50%" 
         android:fromdegrees="330" 
         android:todegrees="360" 
         android:repeatCount="1" />     

</animation-list>

原文地址:https://www.jb51.cc/android/310502.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐