Skip to content

ufo22940268/Android-CityIndexableListView

Repository files navigation

#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

About

Android listview with alphabet indexer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages