Android 暂停时输入什么以平衡恢复时输入的内容

Android 暂停时输入什么以平衡恢复时输入的内容,android,oncreate,onpause,Android,Oncreate,Onpause,onResume继续循环,直到我在onPause中放入某种kill命令。在onResume中,我转到另一个活动以显示hello屏幕。我应该在onPause中输入什么来阻止onResume循环 @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); } @Override protected void onPostResume() { sup

onResume继续循环,直到我在onPause中放入某种kill命令。在onResume中,我转到另一个活动以显示hello屏幕。我应该在onPause中输入什么来阻止onResume循环

    @Override
protected void onPause() {
    // TODO Auto-generated method stub
    super.onPause();
}

@Override
protected void onPostResume() {

    super.onPostResume();
}

@Override
protected void onRestart() {
    // TODO Auto-generated method stub

    super.onRestart();
}

@Override
protected void onResume() {

    super.onResume();
}

@Override
protected void onStart() {
    Intent intent = new Intent(MainActivity.this, MainWelcome.class);
    startActivity(intent);
    super.onRestart();
}
同学们好

    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.welcome_screen);
    imageView = (ImageView) findViewById(R.id.welcome);
    BitmapFactory.Options options = new BitmapFactory.Options();
    options.inJustDecodeBounds = true;
    BitmapFactory.decodeResource(getResources(), R.drawable.hello_screen, options);
    imageView.setImageBitmap(
            decodeSampledBitmapFromResource(getResources(), R.drawable.hello_screen, 700, 700));
    new CountDownTimer(3000, 100) {

        @Override
        public void onFinish() {
             finish();
        }

        @Override
        public void onTick(long arg0) {
            // TODO Auto-generated method stub

        }

    }.start();

每次活动启动时,您都将重新启动它

@Override
protected void onStart() {
   Intent intent = new Intent(MainActivity.this, MainWelcome.class);
   startActivity(intent);
   super.onRestart();// <----Problem there
}
@覆盖
受保护的void onStart(){
意向意向=新意向(MainActivity.this、MainWelcome.class);
星触觉(意向);

super.onRestart();//谢谢,但应用程序仍在循环。有什么方法可以取消意向吗?@Aaron您可能想将意向代码从
onStart
移动到
onPostResume
。我以前试过了,但它不断循环hello屏幕。有什么东西我应该在暂停时输入以取消吗?hello屏幕中有问题我发布了hello屏幕的代码。当我使用intent调用onCreate()中的hello类时,hello屏幕会弹出,然后返回到主活动。