首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

android animation 应用自定义 ProgressDialog

2013-03-01 
android animation 使用自定义 ProgressDialog1、建立myprogress.xml在 res/anim中?xml version1.0 enc

android animation 使用自定义 ProgressDialog

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"/>

?

热点排行