/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
splash = (ImageView) findViewById(R.id.splash);
splash.setImageResource(R.drawable.loading); // image for splash window...
text = (TextView) findViewById(R.id.text);
Thread t = new Thread() {
public void run() {
// for example, wait 4 seconds
mHandler.postDelayed(update, 4000);
// right now!! (no wait)
// mHandler.post(update);
}
};
t.start();
}
final Runnable update = new Runnable() {
public void run() {
splash.setVisibility(View.GONE); //hide
text.setVisibility(View.VISIBLE); //show
}
};