Question: I want my app to show the side navigation drawer as soon as the main activity is created.
My code works fine - user launches app and gets the open drawer - but I'd like to actually *see* the side drawer sliding from the left; instead, I find the drawer fully opened.

At what point should I call `openDrawer()`?
Have tried calling from:

* main activity OnCreate;
* similar points in the fragment hosted by the drawer.

I could try OnPrepareOptionsMenu, but I think it gets called more than once during the activity lifecycle. I also tried OnStart() and I fear my options are over.
Any idea? I'm sure this is pretty simple but I can't figure out.

**Edit**: I realize I wasn't so clear with my first exposition of the question (@Biu). I'm talking about a purely graphical issue here. The point is:

* I have something to happen at startup; in my case we're speaking about the nav drawer sliding into the main screen, but it could be any animation I think;
* In my case, one could just call:

```
protected void OnCreate(Bundle b) {
...
DrawerLayout.openDrawer()
}

```
* The above solution works well. The issue I'm talking about is graphical; with the above code you launch the app and find the main activity covered with an *already-opened* drawer. Instead, I'd like the user to have clue of what is happing, to see where the panel came from; in other words, to see the opening animation.

So my question is: when should I call `openDrawer()`? The main Activity onCreate isn't quite right, because the animation ends before the user gets to see something on screen.

I thought that the wish of having something *start* when all is loaded would be more common.

Answer: 
You could use this hack by using `SharedPreferences`

```
 boolean firstTime = true;

 SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
 public void onCreate(Bundle bundle) 
 {
     if (pref.getBoolean("firstTime", true) == true)
     {
          drawer.openDrawer(yourDrawer);
          firstTime = false;
          pref.editor().putBoolean("firstTime", firstTime).apply();
     }
  }

```
[Activity](http://developer.android.com/reference/android/app/Activity.html)

The foreground lifetime of an activity happens between a call to onResume() until a corresponding call to onPause(). During this time the activity is in front of all other activities and interacting with the user. 

**Thus I think onResume is the best place to open your drawer.**