title: How to navigate to a parent activity
body: <p>Well when im working on something and i need to configure the action bar in my app
  i started from the <a href="http://developer.android.com">http://developer.android.com</a>
  and i found what i am looking for </p>
  
  <pre><code>public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) {
  // Respond to the action bar's Up/Home button
  case android.R.id.home:
      NavUtils.navigateUpFromSameTask(this);
      return true;
  }
  return super.onOptionsItemSelected(item);}
  </code></pre>
  
  <p>ofcourse after adding the </p>
  
  <pre><code>&lt;activity
      android:name="com.example.myfirstapp.DisplayMessageActivity"
      android:label="@string/title_activity_display_message"
      android:parentActivityName="com.example.myfirstapp.MainActivity" &gt;
      &lt;!-- Parent activity meta-data to support 4.0 and lower --&gt;
      &lt;meta-data
          android:name="android.support.PARENT_ACTIVITY"
          android:value="com.example.myfirstapp.MainActivity" /&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>and the</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      ...
      getActionBar().setDisplayHomeAsUpEnabled(true);
  }
  </code></pre>
  
  <p>i did all of this
  but when on my program i press the up button in the action bar the program crashes
  and here is the logcat</p>
  
  <pre><code>09-04 12:54:02.087: E/AndroidRuntime(11033): FATAL EXCEPTION: main
  09-04 12:54:02.087: E/AndroidRuntime(11033): java.lang.IllegalArgumentException: Activity LegendActivity does not have a parent activity name specified. (Did you forget to add the android.support.PARENT_ACTIVITY &lt;meta-data&gt;  element in your manifest?)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.support.v4.app.NavUtils.navigateUpFromSameTask(NavUtils.java:177)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at com.yay.android.projects.stories.LegendActivity.onOptionsItemSelected(LegendActivity.java:44)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.app.Activity.onMenuItemSelected(Activity.java:2611)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at com.android.internal.widget.ActionBarView$3.onClick(ActionBarView.java:206)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.view.View.performClick(View.java:4261)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.view.View$PerformClick.run(View.java:17356)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.os.Handler.handleCallback(Handler.java:615)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.os.Handler.dispatchMessage(Handler.java:92)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.os.Looper.loop(Looper.java:137)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at android.app.ActivityThread.main(ActivityThread.java:4921)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at java.lang.reflect.Method.invokeNative(Native Method)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at java.lang.reflect.Method.invoke(Method.java:511)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
  09-04 12:54:02.087: E/AndroidRuntime(11033):    at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>everything is just like they said 
  ofcourse i have changed the activity names corresponding to names i have
  what's the problem here?</p>