Good afternoon, I'm starting to learn ansdroid, and I'm in the same tightening, I can not change the screen for minutes, where am I going wrong and can someone give me an optimization?
public void passartelacategoria(View view) {
final int MILISEGUNDOS = 3000;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent chamando = new Intent(MainActivity.this, categoriaActivity.class);
MainActivity.this.startActivity(chamando);
MainActivity.this.finish();
}
}, MILISEGUNDOS);
}