In my android app, I need to design a Welcome Screen which will be shown to the user only once after the app is installed and opened. The app in question is a database drive
I created a SplashScreen with this:
package com.olidroide; import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; public class SplashScreen extends Activity{ /** Called when the activity is first created. */ public ProgressDialog myDialog; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splashscreen); new Handler().postDelayed(new Runnable() { public void run() { myDialog = ProgressDialog.show(SplashScreen.this,"", "Loading", true); Intent intent=new Intent(SplashScreen.this,OtherActivity.class); SplashScreen.this.startActivity(intent); myDialog.dismiss(); SplashScreen.this.finish(); } }, 3000);// 3 Seconds } };