当前位置: 代码迷 >> Android >> Android 软件运作前加载图片
  详细解决方案

Android 软件运作前加载图片

热度:83   发布时间:2016-05-01 19:19:59.0
Android 软件运行前加载图片

Android 软件运行前需要有个正在加载中的图片来进行美化我们的程序,下面是代码,

  //无title       requestWindowFeature(Window.FEATURE_NO_TITLE);    

?

??

//全屏       getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN , WindowManager.LayoutParams. FLAG_FULLSCREEN);  

???

//设置布局文件,在布局文件里设置个图片setContentView(R.layout.main);

???

//建一个线程,并延时5秒后跳到另一个activitynew Handler().postDelayed(new Runnable() {   @Override   public void run() {    // TODO Auto-generated method stub    Intent cIntent = new Intent();    cIntent.setClass(GridviewActivity.this, Mainbox.class);    startActivity(cIntent);   }  }, 5000);

?

  相关解决方案