【发布时间】:2015-03-24 09:54:07
【问题描述】:
【问题讨论】:
【问题讨论】:
创建动画 xml:
<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/progress_bar"
android:pivotX="50%"
android:pivotY="50%" />
在布局 xml 中为进度条视图设置以下内容:
android:indeterminateDrawable="@animator/progressbar_animation"
【讨论】:
你可以取一个普通的布局文件: loader.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:clickable="false">
<ProgressBar
android:id="@+id/progressBar1"
style="@android:style/Widget.ProgressBar.Small.Inverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:layout_centerInParent="true"
android:padding="30dp"
android:clickable="false"/>
<ImageView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/img"
android:clickable="false"/>
</RelativeLayout>
根据你的设计做一些小调整。
现在使用这个布局作为你的进度对话框drawable。
【讨论】: