android启动页延时跳转

【android启动页延时跳转】智者不为愚者谋,勇者不为怯者死。这篇文章主要讲述android启动页延时跳转相关的知识,希望能为你提供帮助。

package com.goodness.goodness; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; public class MainActivity extends AppCompatActivity { private Context context = MainActivity.this; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //去掉TitleBar(需要放到setContentView上面) //requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); new Handler().postDelayed(new Runnable() { @Override public void run() { Intent intent = new Intent(context, IndexActivity.class); //设置调转页面 startActivity(intent); //跳转 finish(); //销毁当前页面 } }, 3000); } }

 

    推荐阅读