public class MainActivity extends AutoLayoutActivity {
int reclen=1;
Handler handler=new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
handler.postDelayed(new Runnable() {
@Override
public void run() {
reclen--;
if(reclen<0){
Intent intent=new Intent(MainActivity.this,Home2Activity.class);
startActivity(intent);
finish();
return;
}
handler.postDelayed(this,500);
}
},1000) ;
}
}
int reclen=1;
Handler handler=new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
handler.postDelayed(new Runnable() {
@Override
public void run() {
reclen--;
if(reclen<0){
Intent intent=new Intent(MainActivity.this,Home2Activity.class);
startActivity(intent);
finish();
return;
}
handler.postDelayed(this,500);
}
},1000) ;
}
}