创建blink.xml
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/selected" android:oneshot="false">
<item android:drawable="@drawable/Picture_1" android:duration="10000" />
<item android:drawable="@drawable/Picture_2" android:duration="10000" />
<item android:drawable="@drawable/Picture_3" android:duration="10000" />
<item android:drawable="@drawable/Picture_4" android:duration="10000" />
<item android:drawable="@drawable/Picture_5" android:duration="10000" />
</animation-list>
将blink.xml放入可绘制文件夹中并在活动代码中写入 将此代码写入。
ImageView mImageView ;
mImageView = (ImageView)findViewById(R.id.imageView); //this is your imageView
mImageView .setImageDrawable(getResources().getDrawable(R.drawable.blink));
然后你会得到你想要的。
谢谢,这真的很好,即时通讯android新手和即时编程的平板电脑使用3.1的东西,当我在我的虚拟android设备上运行的应用程序,它带来了一个更小的屏幕像肖像是有无论如何修复这个和有什么简单的方法可以让图像视图充满屏幕?谢谢你这么多 – 2011-05-25 16:53:00
试着把这个放在ImageView xml属性上:android:layout_width =“fill_parent”android:layout_height =“fill_parent”。然后用你需要的值设置android:scaleType属性。看看这个链接:http://android-developers.blogspot.com/2009/03/android-layout-tricks-3-optimize-by.html – BFil 2011-05-25 17:01:22
工程很好@BFil。谢谢!!! – groff07 2013-10-24 12:50:35