use of cn.bingoogolapple.refreshlayout.BGAMoocStyleRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class NormalRecyclerViewActivity method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
BGAMoocStyleRefreshViewHolder moocStyleRefreshViewHolder = new BGAMoocStyleRefreshViewHolder(mApp, true);
moocStyleRefreshViewHolder.setOriginalImage(R.mipmap.bga_refresh_moooc);
moocStyleRefreshViewHolder.setUltimateColor(R.color.imoocstyle);
mRefreshLayout.setRefreshViewHolder(moocStyleRefreshViewHolder);
initBanner();
mDataRv.addItemDecoration(new Divider(this));
mDataRv.setLayoutManager(new GridLayoutManager(mApp, 2, GridLayoutManager.VERTICAL, false));
// mDataRv.setLayoutManager(new LinearLayoutManager(mApp, LinearLayoutManager.VERTICAL, false));
mDataRv.setAdapter(mAdapter);
mEngine.loadInitDatas().enqueue(new Callback<List<RefreshModel>>() {
@Override
public void onResponse(Call<List<RefreshModel>> call, Response<List<RefreshModel>> response) {
mAdapter.setData(response.body());
}
@Override
public void onFailure(Call<List<RefreshModel>> call, Throwable t) {
}
});
}
Aggregations