I want that a new activity should start with some delay on pressing a button. Is it possible to do that , and whats the procedure.
You could call a Runnable using the Handler postDelayed() method.
Here's an example (http://developer.android.com/resources/articles/timed-ui-updates.html):
private Handler mHandler = new Handler();
...
OnClickListener mStartListener = new OnClickListener() {
public void onClick(View v) {
mHandler.postDelayed(mUpdateTimeTask, 100);
}
};
private Runnable mUpdateTimeTask = new Runnable() {
public void run() {
// do what you need to do here after the delay
}
};
Props to @mad for getting it right the first time around.