android自定义progressdialog

时间:2014-07-21 13:26:45   收藏:0   阅读:294

http://blog.sina.com.cn/s/blog_3e333c4a010133ze.html

1、建立myprogress.xml在 res/anim中

<?xml version="1.0" encoding="UTF-8"?>

<animation-list android:oneshot="false"

xmlns:android="http://schemas.android.com/apk/res/android">

<item android:duration="500" android:drawable="@drawable/progress1" />

<item android:duration="500" android:drawable="@drawable/progress2" />

<item android:duration="500" android:drawable="@drawable/progress3" />

<item android:duration="500" android:drawable="@drawable/progress4" />

</animation-list>


2、在style.xml中

 

<style name="oaprogress" parent="@android :style/Widget.ProgressBar">

<item name="android:indeterminateDrawable">@anim/myprogress</item>

<item name="android:backgroundDimEnabled">true</item>

</style>


3、在layout中

<ProgressBar 

android:layout_width="wrap_content" 

android:layout_height="wrap_content" 

style="@style/oaprogress"

/>

android自定义progressdialog,布布扣,bubuko.com

原文:http://my.oschina.net/rainy123/blog/293155

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!