use of it.gmariotti.cardslib.demo.utils.SimpleSectionedListAdapter in project cardslib by gabrielemariotti.
the class MainActivity method _initMenu.
private void _initMenu() {
mDrawerList = (ListView) findViewById(R.id.drawer);
if (mDrawerList != null) {
ArrayAdapter<String> mAdapter = new ArrayAdapter<String>(this, R.layout.demo_activity_menuitem, options);
List<SimpleSectionedListAdapter.Section> sections = new ArrayList<SimpleSectionedListAdapter.Section>();
sections.add(new SimpleSectionedListAdapter.Section(CASE_STD, "Card base features"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_BIRTH, "Card examples"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_LIST_BASE, "List and Grid"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_LIST_GPLAY_CAB, "Multichoice"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_CARDWITHLIST, "Misc"));
SimpleSectionedListAdapter.Section[] dummy = new SimpleSectionedListAdapter.Section[sections.size()];
mSectionedAdapter = new SimpleSectionedListAdapter(this, R.layout.demo_activity_menusection, mAdapter);
mSectionedAdapter.setSections(sections.toArray(dummy));
mDrawerList.setAdapter(mSectionedAdapter);
mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
}
}
use of it.gmariotti.cardslib.demo.utils.SimpleSectionedListAdapter in project cardslib by gabrielemariotti.
the class MainNativeActivity method _initMenu.
private void _initMenu() {
mDrawerList = (ListView) findViewById(R.id.drawer);
if (mDrawerList != null) {
ArrayAdapter<String> mAdapter = new ArrayAdapter<String>(this, R.layout.demo_activity_menuitem, options);
List<SimpleSectionedListAdapter.Section> sections = new ArrayList<SimpleSectionedListAdapter.Section>();
sections.add(new SimpleSectionedListAdapter.Section(CASE_STD, "Card base features"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_BIRTH, "Card examples"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_LIST_BASE, "List and Grid"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_LIST_GPLAY_CAB, "Multichoice"));
sections.add(new SimpleSectionedListAdapter.Section(CASE_CARDWITHLIST, "Misc"));
SimpleSectionedListAdapter.Section[] dummy = new SimpleSectionedListAdapter.Section[sections.size()];
mSectionedAdapter = new SimpleSectionedListAdapter(this, R.layout.demo_activity_menusection, mAdapter);
mSectionedAdapter.setSections(sections.toArray(dummy));
mDrawerList.setAdapter(mSectionedAdapter);
mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
}
}
Aggregations