A recyclerView library from XGFE Android Components.
##Install
Now just clone this repository and import the module 'xgrecyclerview'.
##Usage
This is a simple list binding object Data to a TextView. Using a XGAdapterHelper , the code is just like this:
recyclerView = (XGRecyclerView) findViewById(R.id.list_act_rv);
adapter = XGAdapter.with(recyclerView.adapter())
.itemAdapter(XGAdapter
.<Data>item(R.layout.item_list_with_redtext)
.bindText(R.id.list_item_tv, data -> data.text)
.build())
.build();
adapter.setDataSource(dataSource = new SimpleDataSource<>(adapter));
dataSource.setData(list); //list is where data from
Full code is here.
##SampleList
- Simple Base List: The basic usage using basic classes. click
- Simple Helper List: The basic usage using XGAdapterHelper to build and bind item to datasource. click
- Multiple Type List: The sample for two or multiple types list. click
- Selectable List: The sample for a list with listener callback and other handler.Include a best practices for ItemAnimator. click
- Collapsible HeaderFooter List: The sample for list using CollapsibleDataSource to be collapsible with header and footer. click
- Loadable HeaderFooter Filter List: The sample for list using LoadableDataSource to be loadable with header ,footer and filter to filter data. click
- Section HeaderFooter Filter List: The sample for list using SectionDataSource with section titles, header ,footer and filter to filter data. click
- Menu List: The sample for list using MenuDataSource witch extending from SectionDataSource with click handler. click
- Refresh List: The sample just using XGRefresheRecyclerView. click
- TouchHelper List: The sample for list using TouchHelperDataSource to adapt to ItemTouchHelper. click