Search in sources :

Example 1 with FoodAdapter

use of com.lcodecore.twinklingrefreshlayout.adapter.FoodAdapter in project TwinklingRefreshLayout by lcodecorex.

the class FoodActivity method setupRecyclerView.

private void setupRecyclerView(RecyclerView rv) {
    rv.setLayoutManager(new LinearLayoutManager(rv.getContext()));
    foodAdapter = new FoodAdapter();
    rv.setAdapter(foodAdapter);
    final TwinklingRefreshLayout refreshLayout = (TwinklingRefreshLayout) findViewById(R.id.refresh);
    //        ProgressLayout headerView = new ProgressLayout(getContext());
    BezierLayout headerView = new BezierLayout(this);
    refreshLayout.setHeaderView(headerView);
    //        refreshLayout.setFloatRefresh(false);
    refreshLayout.setPureScrollModeOn(true);
    //        refreshLayout.setEnableOverlayRefreshView(false);
    //        refreshLayout.setAutoLoadMore(true);
    refreshCard();
}
Also used : TwinklingRefreshLayout(com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout) FoodAdapter(com.lcodecore.twinklingrefreshlayout.adapter.FoodAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) BezierLayout(com.lcodecore.tkrefreshlayout.header.bezierlayout.BezierLayout)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 TwinklingRefreshLayout (com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout)1 BezierLayout (com.lcodecore.tkrefreshlayout.header.bezierlayout.BezierLayout)1 FoodAdapter (com.lcodecore.twinklingrefreshlayout.adapter.FoodAdapter)1