Friday, 14 June 2013

Splash activity or Welcome page in android

public class SplashActivity extends Activity {
private long time = 2000; //time
private Context context;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
context = this;
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash);

Handler handler = new Handler();

// run a thread after 2 seconds to start the home screen
handler.postDelayed(new Runnable() {

@Override
public void run() {
finish();
Intent intent = new Intent(context, LoginActivity.class);
context.startActivity(intent);
}

}, time);
}

}

2 comments:

  1. The Best Casino in South Africa | Top 10 Slots, Roulette and Blackjack
    There netteller are e sport a lot of great casino sites to choose from, and some 벳 이스트 of the best ones are And, of 토 타임 course, we have the best free casino games for 무료 룰렛 게임 South Africans

    ReplyDelete
  2. Casino Game For Sale by Hoyle - Filmfile Europe
    › casino-games › casino-games 출장안마 › casino-games › casino-games Casino Game herzamanindir.com/ for sale by Hoyle on 1xbet korean Filmfile Europe. Free shipping for most countries, ventureberg.com/ no download required. Check the filmfileeurope.com deals we have.

    ReplyDelete