Android 小项目之--消息、线程、动画显示图片
2010-06-04 14:29:00 来源:WEB开发网擂上篇文章锢示??的例子,呃次在android?程奄面我又加入了??的方式,??程更好的?助我?做更好的??效果,本例子,?用到四??片,每??片出?的锢示方式都不一?,每隔三秒锢示一?不同的?片,其锢示方式都不一?,具篦操作看代瘁:
private static final int my_key=0x123;
private int a=0;
private int[] myImage={
R.drawable.aa,
R.drawable.bb,
R.drawable.cc,
R.drawable.dd
};
??效果的方案你可以?考:http://www.cnblogs.com/TerryBlog/archive/2010/05/30/1747311.html或者http://www.cnblogs.com/TerryBlog/archive/2010/05/31/1748628.html
?程的效果方案你可以?考:http://www.cnblogs.com/TerryBlog/archive/2010/06/01/1749516.html
本篇不咿多解?代瘁,有任何?铨可以?考以上三篇文章,下?斤出效果的全部代瘁:
package cn.terry;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.*;
public class testHandler extends Activity implements Runnable {
private static final int my_key=0x123;
private int a=0;
private int[] myImage={
R.drawable.aa,
R.drawable.bb,
R.drawable.cc,
R.drawable.dd
};
private Handler myHandler;
private Thread myThread;
private ImageView myImageView;
private Animation myAnimationAlpha;
private Animation myAnimationScale;
private Animation myAnimationTranslate;
private Animation myAnimationRotate;
/** Called when the activity is first created. */
更多精彩
赞助商链接