Skip to content

A recyclerView library from XGFE Android Components.

Notifications You must be signed in to change notification settings

xgfe/XGRecyclerView

 
 

Repository files navigation

XGRecyclerView

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

  1. Simple Base List: The basic usage using basic classes. click
  2. Simple Helper List: The basic usage using XGAdapterHelper to build and bind item to datasource. click
  3. Multiple Type List: The sample for two or multiple types list. click
  4. Selectable List: The sample for a list with listener callback and other handler.Include a best practices for ItemAnimator. click
  5. Collapsible HeaderFooter List: The sample for list using CollapsibleDataSource to be collapsible with header and footer. click
  6. Loadable HeaderFooter Filter List: The sample for list using LoadableDataSource to be loadable with header ,footer and filter to filter data. click
  7. Section HeaderFooter Filter List: The sample for list using SectionDataSource with section titles, header ,footer and filter to filter data. click
  8. Menu List: The sample for list using MenuDataSource witch extending from SectionDataSource with click handler. click
  9. Refresh List: The sample just using XGRefresheRecyclerView. click
  10. TouchHelper List: The sample for list using TouchHelperDataSource to adapt to ItemTouchHelper. click

About

A recyclerView library from XGFE Android Components.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%