Tuesday, November 2, 2010

[android-developers] Splash screen | warning: Activity not started, its current task has been brought to the front

Hii,
i want to display a splash screen followed by my trial.class.I am not
getting any error but warning as:

Warning: Activity not started, its current task has been brought to
the front

i have different-2 approches for this each time this warning is being
displayed.
public class Splash extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread splashThread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while (waited < 5000) {
sleep(100);
waited += 100;
}
} catch (InterruptedException e) {
// do nothing
} finally {
finish();
Intent i = new Intent();
i.setClass(Splash.this,Trial.class);
startActivity(i);
}
}
};
splashThread.start();
}
}
Thanks

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate