ImageView的动画在部分手机上会自动播放,比较奇怪,就在网上找了找解决办法。
转自
自动播放:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/wave"
android:layout_centerHorizontal="true"
/>
不会自动播放:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/wave"
android:layout_centerHorizontal="true"
/>
设置 animation-list drawble 作为background, 需要自己调用AnimationDrawable.start()
.希望能帮到你.