The easiest way to create a splash would be to create it as a separate activity that dies after a while.
Something like this would do. Just put your splash image e.g. as a png image in your drawable folder
and start the Splash activity by sending an intent from your main app code.
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Window;
import android.widget.ImageView;
public class Splash extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
ImageView v = new ImageView(this);
v.setImageResource(R.drawable.splash);
setContentView(v);
AsyncTask t = new AsyncTask(){
@Override
protected Void doInBackground(Void... params) {
try {
//Show the splash one second
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void result) {
finish();
}
};
t.execute();
}
}