title: android Unfortunately Application has stopped working with string array using listadapter
body: <p>i want to know why application crashes when i use this.
  i have used it with another application and that working fine but in this application its not working properly.</p>
  
  <pre><code>import android.app.ListActivity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.Toast;
  
  public class Menu extends ListActivity {
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      String[] values = new String[] { "Calculator", "Unit Converter" };
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_list_item_1, values);
      setListAdapter(adapter);
    }
  
    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
  
      switch (position) {
      case 0:
          Intent newActivity = new Intent(this, Rig.class);
          startActivity(newActivity);
          break;
      }
      String item = (String) getListAdapter().getItem(position);
  
      Toast.makeText(this, item + " Started", Toast.LENGTH_SHORT).show();
    }
  }
  </code></pre>
  
  <p>this is main activity which works fine if i change the Menu.class to any other activity.</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      Intent newactivity = new Intent(this, Menu.class);
      startActivity(newactivity);
      finish();
  }
  </code></pre>
  
  <p>manifest file code added</p>
  
  <pre><code>    &lt;activity
          android:name="com.blogspot.andriopak.rig.Menu"
          android:configChanges="screenSize|orientation"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.blogspot.andriopak.menu" /&gt;
  
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>