由一个Activity 跳转到另一个Activity ,延时。 public class ScreenSplash extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // View view = new SplashView(ScreenSplash.this); setContentView(R.layout.splash); // setContentView(view); /** set time to splash out **/ final int nWelcomeScreenDisplay = 5000; new Handler().postDelayed(new Runnable() { @Override public void run() { Intent mainIntent = new Intent(ScreenSplash.this, Main.class); startActivity(mainIntent); ScreenSplash.this.finish(); } }, nWelcomeScreenDisplay); } // class SplashView extends View { // SplashView(Context context) { // super(context); // } // protected void onDraw(Canvas canvas) { // super.onDraw(canvas); // Paint paint = new Paint(); // BitmapFactory.Options options = new BitmapFactory.Options(); // options.inSampleSize = 2;//图片宽高都为原来的二分之一,即图片为原来的四分之一 // Bitmap bitmap = BitmapFactory.decodeResource(getResources(), // R.drawable.bg_control_panel_land); // // canvas.drawBitmap(bitmap, 0, 0, paint); // } // } }

更多相关文章

  1. android如何拍照以及返回拍的图片(经过验证的实际例子)
  2. android从相册或者照相获取图片,并且进行裁切
  3. android下图片压缩 -- 图像处理
  4. android帧动画(图片切换)——语音播放小喇叭
  5. Android前端开发15:显示网络图片
  6. Android Retrofit 图片上传的最简单和明白的实现方式
  7. Android设置桌面背景图片的方法
  8. Android从服务器获取图片的实例方法

随机推荐

  1. 检索InnoDB组合密钥表的最后插入ID
  2. php 实现下载的方法
  3. 大文件从指定行开始读取
  4. 如何通过热门/上升的帖子订购
  5. mysql_query会自动执行,但不会在onClick时
  6. php写app接口并返回json数据
  7. PHP环境搭建和编写API接口
  8. ajax php bomt头 utf-8带来的奇怪问题。
  9. MySQL错误1046:未选择数据库
  10. PHP 开发环境配置