Hi,
I implemented a splash screen activity in the following way.

[...]

public class Splash extends Activity {
  private final int SPLASH_DISPLAY_LENGHT = 3000;

  private Handler handler = new Handler();

 @Override
public void onCreate(Bundle bundle){
    super.onCreate(bundle);
    setContentView(R.layout.splash);

    handler.postDelayed(new Runnable() {
        public void run() {
          Log.d(this.getClass().getName(), "handler.postDelayed()");

          /* Create an intent that will start the main activity. */
          Intent mainIntent = new Intent(Splash.this,
MyListView.class);
          MyListView.this.startActivity(mainIntent);
          MyListView.this.finish();
        }
      }, SPLASH_DISPLAY_LENGHT);
  }

  @Override
  public void onStart() {
    super.onStart();
  }

  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    Log.d(this.getClass().getName(), "onConfigurationChanged
newConfig:" + newConfig.toString());
    super.onConfigurationChanged(newConfig);
  }

[...]

Everythings works fine unless.. a configuration change event handeled
while the splash screen is shown. In this case everytime the
orientation change the handler add a new "Runabel Object" to queue.
And the MyListActivity will be started X-times.

i am thankfull for every advice.
best regards matthias






-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to