use of cn.bingoogolapple.refreshlayout.BGANormalRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class SwipeRecyclerViewActivity method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
mRefreshLayout.setRefreshViewHolder(new BGANormalRefreshViewHolder(mApp, true));
initBanner();
mDataRv.addItemDecoration(new Divider(this));
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mDataRv.setLayoutManager(linearLayoutManager);
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) {
}
});
}
use of cn.bingoogolapple.refreshlayout.BGANormalRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class RefreshStaggeredRecyclerViewFragment method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
mRefreshLayout.setCustomHeaderView(DataEngine.getCustomHeaderView(mApp), true);
mRefreshLayout.setRefreshViewHolder(new BGANormalRefreshViewHolder(mApp, true));
StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL);
mDataRv.setLayoutManager(layoutManager);
mDataRv.setAdapter(mAdapter);
}
use of cn.bingoogolapple.refreshlayout.BGANormalRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class ViewPagerActivity method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
mRefreshLayout.setRefreshViewHolder(new BGANormalRefreshViewHolder(mApp, true));
initBanner();
mFragments = new Fragment[4];
mFragments[0] = mRecyclerViewFragment = new StickyNavRecyclerViewFragment();
mFragments[1] = mListViewFragment = new StickyNavListViewFragment();
mFragments[2] = mScrollViewFragment = new StickyNavScrollViewFragment();
mFragments[3] = mWebViewFragment = new StickyNavWebViewFragment();
mTitles = new String[4];
mTitles[0] = "RecyclerView";
mTitles[1] = "ListView";
mTitles[2] = "ScrollView";
mTitles[3] = "WebView";
mContentVp.setAdapter(new ContentViewPagerAdapter(getSupportFragmentManager()));
mIndicator.initData(0, mContentVp);
}
use of cn.bingoogolapple.refreshlayout.BGANormalRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class NormalListViewActivity method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
mRefreshLayout.setRefreshViewHolder(new BGANormalRefreshViewHolder(mApp, true));
mDataLv.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) {
}
});
}
use of cn.bingoogolapple.refreshlayout.BGANormalRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class SwipeListViewActivity method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
mRefreshLayout.setRefreshViewHolder(new BGANormalRefreshViewHolder(mApp, true));
mDataLv.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