title: Showing Alphabet Index in android listview
body: <p>I have created listview and i want to implement sectionindexer and alphabetIndexer in my listview.
   I am reffering <a href="http://www.anddev.org/tutalphabetic_fastscroll_listview_-_similar_to_contacts-t10123.html" rel="nofollow">http://www.anddev.org/tutalphabetic_fastscroll_listview_-_similar_to_contacts-t10123.html</a>. That works excellent. But for my code , i am not getting how to implement that  functionality. </p>
  
  <p>here is my list_item.xml code :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:gravity="center"
      android:background="@drawable/list_selector"
      android:padding="5dp"
      android:id="@+id/tab"&gt;
  
      &lt;LinearLayout android:id="@+id/thumbnail"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="3dip"
          android:layout_alignParentLeft="true"
          android:layout_marginRight="5dip"&gt;
  
          &lt;ImageView
              android:id="@+id/list_image"
              android:layout_width="50dip"
              android:layout_height="50dip"
              android:src="@drawable/musicsymbol"/&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;TextView 
          android:id="@+id/songTitle"
          android:layout_width="200dip"
          android:layout_height="wrap_content"
          android:textSize="16dp"
          android:textColor="#ffffff"
          android:textStyle="bold"
          android:layout_alignTop="@+id/thumbnail"
          android:color="#10bcc9"
          android:maxLines="1"
          android:layout_toRightOf="@+id/thumbnail"
          /&gt;
  
          &lt;TextView
          android:id="@+id/duration"
          android:layout_width="56dip"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_toRightOf="@id/songTitle"
          android:gravity="right"
          android:layout_marginRight="5dip"
          android:textSize="15dip"
          android:textColor="#10bcc9"
          android:textStyle="bold"
          android:maxLines="1"
         /&gt;
  
         &lt;TextView 
          android:id="@+id/songArtist"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@id/songTitle"
          android:textSize="14dp"
          android:color="#10bcc9"
          android:textStyle="bold"
          android:lines="1"
          android:layout_toRightOf="@+id/thumbnail"
          /&gt;
  </code></pre>
  
  <p></p>
  
  <p>My JAVA code :</p>
  
  <pre><code>Cursor cursor = managedQuery(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,null , null, null,MediaStore.Audio.Media.TITLE );          
            if (cursor == null) 
            {
                //Query Failed , Handle error.
            }
            else if (!cursor.moveToFirst()) 
            {
               //No media on the device.
            }
            else
            {
  
                int titleColumn = cursor.getColumnIndex(android.provider.MediaStore.Audio.Media.TITLE);
                int idColumn = cursor.getColumnIndexOrThrow(android.provider.MediaStore.Audio.Media.DATA);
                int artistcolumn = cursor.getColumnIndex(android.provider.MediaStore.Audio.Media.ARTIST);
                int durationcolumn =cursor.getColumnIndex(android.provider.MediaStore.Audio.Media.DURATION);
  
                for(int i=0;i&lt;cursor.getCount();i++)
                {
                      String thisTitle = cursor.getString(titleColumn);
                      String path = cursor.getString(idColumn);
                      String artist = cursor.getString(artistcolumn);
                      Long duration = cursor.getLong(durationcolumn);
                      Utilities objUtilities = new Utilities();
                      String timeDuration = objUtilities.milliSecondsToTimer(duration);
  
                     HashMap&lt;String, String&gt; song = new HashMap&lt;String, String&gt;();
                     song.put("songTitle",thisTitle);
                     song.put("songPath", path);
                     song.put("artist", artist);
                     song.put("duration",timeDuration);
  
                     // Adding each song to SongList
                     songsList.add(song);
                     cursor.moveToNext();
                }
            }
  
  
          // looping through playlist
          for (int i = 0; i &lt; songsList.size(); i++) {
              // creating new HashMap
              HashMap&lt;String, String&gt; song = songsList.get(i);
  
              // adding HashList to ArrayList
              songsListData.add(song);
          }
  
  
          // Adding menuItems to ListView
          String[] from = {"songTitle", "artist" , "duration"};
          int[] to={R.id.songTitle,R.id.songArtist, R.id.duration};
           adapter = new SimpleAdapter(this, songsListData,
                  R.layout.playlist_item, from, to);
  
          setListAdapter(adapter);
  </code></pre>
  
  <p>so how to implement sectionindexer with my this listadapter. Please suggest me some solution. Thanx.</p>