ufo22940268/Android-CityIndexableListView


Android listview with alphabet indexer.

Language: Java


IndexableListView

Implement TableView in iphone on android. Add indexer to 'ListView'. When user touch the alphabet on the scroller, it will jump the correspond position of the list view.

Usage

  • install maven.
  • run following command on the root directory of this project. `mvn install && cd indexablelistview-sample && mvn install android:redeploy android:run".

How to use in your project

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        List<String> popItems = new ArrayList<String>();
        for (String s : POPULAR_CITIES) {
            popItems.add(s);
        }

        mItems = new ArrayList<String>();
        for (String s : CITIES) {
            mItems.add(s);
        }

        ContentAdapter adapter = new ContentAdapter(this, popItems, mItems);
        mListView = (IndexableListView) findViewById(R.id.listview);
        mListView.setAdapter(adapter);
        mListView.setFastScrollEnabled(true);
    }

ScreenShot

screenshot

Project Statistics

Sourcerank 4
Repository Size 343 KB
Stars 43
Forks 21
Watchers 6
Open issues 0
Dependencies 0
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Frank Cheng

Something wrong with this page? Make a suggestion

Last synced: 2017-11-24 19:59:52 UTC

Login to resync this repository