本文整理汇总了Java中com.jcodecraeer.xrecyclerview.XRecyclerView类的典型用法代码示例。如果您正苦于以下问题:Java XRecyclerView类的具体用法?Java XRecyclerView怎么用?Java XRecyclerView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XRecyclerView类属于com.jcodecraeer.xrecyclerview包,在下文中一共展示了XRecyclerView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpRecyclerView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void setUpRecyclerView() {
mRecyclerView.setUpAsGrid(mGridColumnCount);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setPullRefreshEnabled(true);
mRecyclerView.setLoadingMoreEnabled(false);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mPresenter.getData(false);
}
@Override
public void onLoadMore() {
}
});
}
示例2: onCreateView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_all_earth, container, false);
ButterKnife.bind(this, view);
presenter = new GlobalPresenter(this);
presenter.getGlobalData();
createData();
rv.setArrowImageView(R.drawable.person_global_fresh_view);
rv.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
rv.refreshComplete();
}
@Override
public void onLoadMore() {
rv.loadMoreComplete();
}
});
return view;
}
示例3: setupRecycleView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void setupRecycleView() {
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecyclerView.setLayoutManager(layoutManager);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
onRecyclerViewResponseRefresh();
}
@Override
public void onLoadMore() {
onRecycleViewResponseLoadMore();
}
});
setupRecycleViewAndAdapter();
}
示例4: setupRecyclerView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void setupRecyclerView() {
mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(3,
StaggeredGridLayoutManager.VERTICAL));
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mLoadIndex = 1;
startRefreshData();
}
@Override
public void onLoadMore() {
if (mDatas.size() <= 0) {
mRecyclerView.loadMoreComplete();
} else {
startLoadData();
}
}
});
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
}
示例5: initView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void initView() {
mDatas = new ArrayList<>();
mRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.srl_refresh);
mRecyclerView = (XRecyclerView) findViewById(R.id.base_recycler_view);
mSearchBtn = (FloatingActionButton) findViewById(R.id.fanju_new_btn_search);
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecyclerView.setLayoutManager(layoutManager);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setPullRefreshEnabled(false);
mRecyclerView.setLoadingMoreEnabled(false);
mSearchBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showSearchDialog();
}
});
}
示例6: initRecyclerView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void initRecyclerView() {
rvList.setPullRefreshEnabled(true);
rvList.setLoadingMoreEnabled(true);
rvList.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
resetDatas();
presenter.getTypeGankList();
}
@Override
public void onLoadMore() {
presenter.getTypeGankList();
}
});
}
示例7: setUpRecyclerView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
private void setUpRecyclerView() {
mRecyclerView.setHasFixedSize(true);
LinearLayoutManager llm = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(llm);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setPullRefreshEnabled(true);
mRecyclerView.setLoadingMoreEnabled(false);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mPresenter.loadForcast("Bandung");
}
@Override
public void onLoadMore() {
}
});
}
示例8: initEvent
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mIsRefresh = true;
mIsLoadMore = false;
mHomePresenter.requestGet();
}
@Override
public void onLoadMore() {
mIsRefresh = false;
mIsLoadMore = true;
mHomePresenter.requestGet();
}
});
mFabButton.setOnClickListener(this);
}
示例9: initEvent
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mIsRefresh = true;
mIsLoadMore = false;
mRandomFragmentPresenter.requestGet();
}
@Override
public void onLoadMore() {
mIsRefresh = false;
mIsLoadMore = true;
mRandomFragmentPresenter.requestGet();
}
});
}
示例10: initEvent
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mIsRefresh = true;
mIsLoadMore = false;
mPictureFragmentPresenter.requestGet();
}
@Override
public void onLoadMore() {
mIsLoadMore = true;
mIsRefresh = false;
mPictureFragmentPresenter.requestGet();
}
});
mFabButton.setOnClickListener(this);
}
示例11: initEvent
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initEvent() {
mRvJoke.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mIsRefresh = true;
mIsLoadMore = false;
mWeChatFragmentPresenter.requestGet();
}
@Override
public void onLoadMore() {
mIsLoadMore = true;
mIsRefresh = false;
mWeChatFragmentPresenter.requestGet();
}
});
mBaseRVAdapter.setOnItemClickListener(this);
}
示例12: initView
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
protected void initView() {
mFABSearch = customFindViewById(R.id.fab_search);
LinearLayoutManager LayoutManager = new LinearLayoutManager(getContext());
mRecyclerView = customFindViewById(R.id.recyclerview);
mBookAdapter = new BookAdapter(getMContext(), new ArrayList<BookBean>());
mRecyclerView.setAdapter(mBookAdapter);
mRecyclerView.setLayoutManager(LayoutManager);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
switchAction(ACTION_REFRESH);
}
@Override
public void onLoadMore() {
switchAction(ACTION_LOAD_MORE);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallClipRotatePulse);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.SquareSpin);
mFABSearch.setOnClickListener(this);
initInputDialog();
dynamicAddSkinView(mFABSearch, "backgroundTint", R.color.colorAccent);
}
示例13: init
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void init() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new ShopCirRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例14: init
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void init() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
// mRecyclerView.setAdapter(new ShopCirRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
showEmptyView(R.layout.combo_empty);
}
示例15: init
import com.jcodecraeer.xrecyclerview.XRecyclerView; //导入依赖的package包/类
@Override
public void init() {
mListener = new OnItemClickListener() {
@Override
public void onItemClick(int position) {
startActivity(new Intent(getActivity(), OrderDetailActivity.class), true);
}
};
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new OrderRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
}, 3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
}, 3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}