title: How to populate list view with song title, artist, duration, and data using list adapter
body: <p>I am making a simple music player. </p>
  
  <p>This method returns the titles of all the songs on my device in a string array. </p>
  
  <pre><code>private String[] getMusic() {
  
          String[] projection = {
                  MediaStore.Audio.Media.TITLE,
          };
  
          final Cursor mCursor = getContentResolver().query(
                  MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
                  projection, null, null,
                  "LOWER(" + MediaStore.Audio.Media.TITLE + ") ASC");
  
          int count = mCursor.getCount();
  
          String[] songs = new String[count];
          int i = 0;
          if (mCursor.moveToFirst()) {
              do {
                  songs[i] = mCursor.getString(0);
                  i++;
              } while (mCursor.moveToNext());
          }
  
          mCursor.close();
  
          return songs;
      }
  </code></pre>
  
  <p>The string array is passed to an adapater which populates a list view.</p>
  
  <pre><code>mMusicList = getMusic();
  ArrayAdapter&lt;String&gt; mAdapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1, mMusicList);
  mListView.setAdapter(mAdapter);
  </code></pre>
  
  <p>How can I include artist, duration, and data using list adapter?</p>
  
  <p>For example, my <code>getMusic()</code> method could begin something like this:</p>
  
  <pre><code>private String[] getMusic() {
  
          String[] projection = {
                  MediaStore.Audio.Media.ARTIST,
                  MediaStore.Audio.Media.TITLE,
                  MediaStore.Audio.Media.DATA,
                  MediaStore.Audio.Media.DURATION
          };
  
          ...
  
      }
  </code></pre>
  
  <p>I cannot figure out the rest. Maybe songs array can be made multidimensional before being passed to the adapter e.g.</p>
  
  <pre><code>songs = {
  
      {title1, data1, duration1},
      {title2, data2, duration2},
      etc...
  }
  </code></pre>