title: Android Menu Item Names
body: <p>Okay, so I'm relatively new to Android, and I'm having some trouble with menu item names. I'll try to explain this the best I can. </p>
  
  <pre><code>public class Menu extends ListActivity{
      //Should be named the same as the Class itself 
      String classes[] = { "example1", "example2", "example3", "example4", "example5"};
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
  
          setListAdapter(new ArrayAdapter&lt;String&gt;(Menu.this, android.R.layout.simple_list_item_1, classes));
  
      }
  
  
      @Override
      protected void onListItemClick(ListView l, View v, int position, long id) {
          // TODO Auto-generated method stub  
  
          String classPosition = classes[position];
  
          super.onListItemClick(l, v, position, id);
          try{
          Class testClass = Class.forName("com.Test." + classPosition);
          Intent testIntent = new Intent(Menu.this, testClass);
          startActivity(testIntent);
          }catch(ClassNotFoundException e){
              e.printStackTrace();
          }
      }
  } 
  </code></pre>
  
  <p>I am currently using this method, but the problem I'm having, is that the name that is displayed on the menu has to be the same as the class name for it to work. If I wanted to call an activity named "Test" then the name displayed would have to be "Test".  I'm sure I could figure this out if I had more time, but I just don't. Any help is appreciated. Thanks.</p>