Search in sources :

Example 1 with RecyclerViewScrollListener

use of de.djuelg.neuronizer.presentation.ui.custom.RecyclerViewScrollListener in project Neuronizer by djuelg.

the class FlexibleRecyclerView method configure.

public void configure(View emptyView, RecyclerView.Adapter adapter, View fabMenu) {
    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());
    FlexibleItemDecoration decoration = new FlexibleItemDecoration(getContext());
    decoration.withDefaultDivider();
    decoration.withDrawOver(true);
    setHasFixedSize(false);
    setLayoutManager(layoutManager);
    setEmptyView(emptyView);
    setAdapter(adapter);
    addItemDecoration(decoration);
    addOnScrollListener(new RecyclerViewScrollListener(fabMenu));
}
Also used : FlexibleItemDecoration(eu.davidea.flexibleadapter.common.FlexibleItemDecoration) RecyclerViewScrollListener(de.djuelg.neuronizer.presentation.ui.custom.RecyclerViewScrollListener) RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 RecyclerViewScrollListener (de.djuelg.neuronizer.presentation.ui.custom.RecyclerViewScrollListener)1 FlexibleItemDecoration (eu.davidea.flexibleadapter.common.FlexibleItemDecoration)1