Setting up the listview component

I am trying to create a list view in Android that will look like this (ignore the search bar):

output.

The iPhone has a similar option called the partition index:

Iphone section index. http://t0.gstatic.com/images?q=tbn:ANd9GcRcssNycAZ6s_vITQaHXwo3A_pDbfGeQImVdPDPiGn5zCMAR4i_

I can get sections in a list with: http://bartinger.at/listview-with-sectionsseparators/

Now I want to build an index (the one to the right of the first image) (The index is configured and can contain more than one alphabet)

I do not want to do this as follows:

create an action that has one kind of list on the left and another kind of text (or maybe anything) on ​​the right, then track the right item and refresh the list. for example: http://hello-android.blogspot.com/2010/11/sideindex-for-android.html

I want to customize the list view of Android itself so that the list view includes such an index on the right. something like that. A class that extends ListActivity and a some or how class contains a sidebar. (I will control the coding for the sidebar to work). Therefore, whenever another class extends MyCustomListActivity , it will have a list and a sidebar.

My question is how to include a sidebar in my custom class that extends ListActivity? Or is there a better approach to this?

+7
source share
1 answer

because my index is not just one letter, in several cases it is a multiple of the letter. - Gaurav Shah 2 days ago

Assuming your only reason for not wanting to use Fast Scrolling with SectionIndexer , here is some code that is designed to run a few letters .

Here is a screenshot of how it should look:

screenshot of a Fast Scrolling ListView using SectionIndexer example using multiple letters

+2
source

All Articles