title: List view music list, of song
body: <p>I added to the raw folder'm developing an application that plays music. 
  By clicking the song is playing music to a ListView. but the music does not pass to the next song when finished. What should I do? </p>
  
  <p>and I'm using translate sorry</p>
  
  <pre><code>public class LoadedActivity extends Activity {
  MediaPlayer mp;
  View View;
  ListView listView;
  Drawable Drawble;
  ImageButton OynatButonu;         
  ImageButton DurdurButonu;
  ImageButton IleriButonu;
  
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.loaded_layout);
  
      Field[] fields = R.raw.class.getFields();
      String[] mediaList = new String[fields.length];
      for (int count = 0; count &lt; fields.length; count++)
          mediaList[count] = fields[count].getName();
  
      listView = (ListView) findViewById(R.id.music_list);
  
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(
              LoadedActivity.this, android.R.layout.simple_list_item_1,
              mediaList);
      listView.setAdapter(adapter);
      listView.setOnItemClickListener(new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; arg0, View v, int position,
                  long id) {
              if (View != null)
                  ((TextView) View).setBackgroundDrawable(Drawble);
              Drawble = ((TextView) v).getBackground();
  
              String uri = "android.resource://" + getPackageName() + "/raw/"
                      + ((TextView) v).getText();
  
              if (mp != null &amp;&amp; mp.isPlaying())
                  mp.stop();
  
              mp = MediaPlayer.create(getApplicationContext(), Uri.parse(uri));
              mp.start();
  
              ((TextView) v).setBackgroundColor(Color.WHITE);
              ((TextView) v).setTextColor(Color.RED);
              View = v;                         
          }
      });
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.menu, menu);
      return true;
      }
  }
  </code></pre>