Code example for FragmentActivity

Methods: getSupportFragmentManager, onCreate, requestWindowFeature

0
import android.view.Window; 
 
public class TWSplashScreenActivity extends FragmentActivity { 
	@Override 
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE); 
		displaySplashScreen(); 
		//setContentView(R.layout.main); 
	} 
	 
	void displayMainActivity(){ 
		Intent intent = new Intent(this.getApplicationContext(), TWMainActivity.class);
		startActivity(intent);
		this.finish();
	} 
	 
    private void displaySplashScreen(){ 
    	final TWSplashScreenFragment frag = TWSplashScreenFragment.newInstance();
    	frag.show(this.getSupportFragmentManager(), "SPLASH_SCREEN");
    	final Handler handler = new Handler();
    	handler.postDelayed(new Runnable(){
    		public void run(){ 
    			frag.dismiss();
    			displayMainActivity();