布局
android:layout_width="82dip"
android:layout_height="50dip"
android:layout_centerInParent="true"
android:background="@drawable/spinner"
android:id="@+id/splashSpinner"/>
可绘制
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
JAVA
this.spinner = this.view.findViewById(R.id.splashSpinner);
this.spinner.post(new Runnable()
{
@Override
public void run()
{
AnimationDrawable spinnerAnim = (AnimationDrawable) spinner.getBackground();
if (!spinnerAnim.isRunning())
{
spinnerAnim.start();
}
}
});