use of cn.bingoogolapple.refreshlayout.BGAStickinessRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class RefreshScrollViewFragment method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
BGAStickinessRefreshViewHolder stickinessRefreshViewHolder = new BGAStickinessRefreshViewHolder(mApp, true);
stickinessRefreshViewHolder.setStickinessColor(R.color.colorPrimary);
stickinessRefreshViewHolder.setRotateImage(R.mipmap.bga_refresh_stickiness);
mRefreshLayout.setRefreshViewHolder(stickinessRefreshViewHolder);
mRefreshLayout.setCustomHeaderView(DataEngine.getCustomHeaderView(mApp), false);
mRefreshLayout.setPullDownRefreshEnable(false);
}
use of cn.bingoogolapple.refreshlayout.BGAStickinessRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class RefreshNormalViewFragment method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
BGAStickinessRefreshViewHolder stickinessRefreshViewHolder = new BGAStickinessRefreshViewHolder(mApp, true);
stickinessRefreshViewHolder.setStickinessColor(R.color.colorPrimary);
stickinessRefreshViewHolder.setRotateImage(R.mipmap.bga_refresh_stickiness);
mRefreshLayout.setRefreshViewHolder(stickinessRefreshViewHolder);
mRefreshLayout.setCustomHeaderView(DataEngine.getCustomHeaderView(mApp), false);
}
use of cn.bingoogolapple.refreshlayout.BGAStickinessRefreshViewHolder in project BGARefreshLayout-Android by bingoogolapple.
the class RefreshRecyclerViewFragment method processLogic.
@Override
protected void processLogic(Bundle savedInstanceState) {
// mRefreshLayout.setCustomHeaderView(DataEngine.getCustomHeaderView(mApp), true);
View headerView = View.inflate(mApp, R.layout.view_custom_header2, null);
// 测试自定义header中控件的点击事件
headerView.findViewById(R.id.btn_custom_header2_test).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ToastUtil.show("点击了测试按钮");
}
});
// 模拟网络数据加载,测试动态改变自定义header的高度
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
((TextView) getViewById(R.id.tv_custom_header2_title)).setText(R.string.test_custom_header_title);
((TextView) getViewById(R.id.tv_custom_header2_desc)).setText(R.string.test_custom_header_desc);
}
}, 2000);
// mRefreshLayout.setCustomHeaderView(headerView, true);
mAdapter.addHeaderView(headerView);
BGAStickinessRefreshViewHolder stickinessRefreshViewHolder = new BGAStickinessRefreshViewHolder(mApp, true);
stickinessRefreshViewHolder.setStickinessColor(R.color.colorPrimary);
stickinessRefreshViewHolder.setRotateImage(R.mipmap.bga_refresh_stickiness);
mRefreshLayout.setRefreshViewHolder(stickinessRefreshViewHolder);
mDataRv.addItemDecoration(new Divider(mApp));
mDataRv.setLayoutManager(new GridLayoutManager(mApp, 2, GridLayoutManager.VERTICAL, false));
// mDataRv.setLayoutManager(new LinearLayoutManager(mApp, LinearLayoutManager.VERTICAL, false));
mDataRv.setAdapter(mAdapter.getHeaderAndFooterAdapter());
}
Aggregations