Click here to Skip to main content
15,886,046 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
i want to design a ui for android and for this i want to display an image on first activity and then i want to add another activity after starting this main activity.
is there any way that i can start it after 3 seconds of main activity automatically?
its urgent, so please help me.
Thank You
Posted
Updated 15-Feb-15 19:38pm
v2

1 solution

C#
try {
    Thread.sleep(3000);
    Intent intent = new Intent(MainActivity.this, SecondActivity.class);
    intent.putExtra("uname",UserKey);
      startActivity(intent);
    finish();
} catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900