Skip to main content
se eliminó 1 carácter en el cuerpo
Origen Enlace

Try thisPrueba esto:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    getSupportActionBar().hide();
    new Timer().schedule(new TimerTask(){
        @Override
        public void run(){
            Intent intent=new Intent(MainActivity.this, MainActivity2.class);
            intent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
            finish();
        }
    },1000);
}

Hope this answer helps youEspero haberte ayudado.

Try this:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    getSupportActionBar().hide();
    new Timer().schedule(new TimerTask(){
        @Override
        public void run(){
            Intent intent=new Intent(MainActivity.this, MainActivity2.class);
            intent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
            finish();
        }
    },1000);
}

Hope this answer helps you.

Prueba esto:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    getSupportActionBar().hide();
    new Timer().schedule(new TimerTask(){
        @Override
        public void run(){
            Intent intent=new Intent(MainActivity.this, MainActivity2.class);
            intent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
            finish();
        }
    },1000);
}

Espero haberte ayudado.

Origen Enlace

Try this:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    getSupportActionBar().hide();
    new Timer().schedule(new TimerTask(){
        @Override
        public void run(){
            Intent intent=new Intent(MainActivity.this, MainActivity2.class);
            intent.addFlags(intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
            finish();
        }
    },1000);
}

Hope this answer helps you.