title: Is there a more efficient way to make my ListView? Only been programming with Android for about 2 weeks
body: <p>I'm extremely new to programming android and programming in general. Haven't learnt anything previous and was just interested in learning some android dev. Anyhow I'll paste my code, but I was wondering if there's a better and more efficient way to create what I'm doing, because it took my about 3 days to even work out how to create this as I couldn't find any tutorials on setting intents up with ListView items. Thanks for your help in advance :)</p>
  
  <p>public class main extends ListActivity {</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
  
      String[] listitems = new String[] {"1","2","3","4","5"};
  
      this.setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.rowlayout,
              R.id.label, listitems));
  }
  </code></pre>
  
  <p>//This is mainly the section I'm unsure about :)</p>
  
  <pre><code>@Override
  protected void onListItemClick(ListView l, View v, int position, long id) {
      super.onListItemClick(l, v, position, id);
  
              switch (position){
              case 0:
                  Intent second = new Intent(this, second.class);
                  startActivity(second);
              }
              return;
  }
  </code></pre>
  
  <p>}</p>