Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuyuyu123/SwipeCardsRecyclerView
an android widget named SwipeCardsRecyclerView which based on RecyclerView.
https://github.com/yuyuyu123/SwipeCardsRecyclerView
Last synced: about 1 month ago
JSON representation
an android widget named SwipeCardsRecyclerView which based on RecyclerView.
- Host: GitHub
- URL: https://github.com/yuyuyu123/SwipeCardsRecyclerView
- Owner: yuyuyu123
- Created: 2016-12-16T09:36:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-18T08:17:29.000Z (almost 8 years ago)
- Last Synced: 2024-08-02T01:17:31.500Z (4 months ago)
- Language: Java
- Homepage:
- Size: 5.3 MB
- Stars: 24
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - SwipeCardsRecyclerView - 基于RecyclerView的Android组件 (Card)
README
# SwipeCardsRecyclerView
an android widget named SwipeCardsRecyclerView which based on RecyclerView.Effect:
![image](https://github.com/yuyuyu123/SwipeCardsRecyclerView/blob/master/screenshot.gif)
How to use it?
Just like a standard RecyclerView:
private void initRecyclerView() {
mRecyclerView = (SwipeCardsRecyclerView) findViewById(R.id.id_recycler_view);
mRecyclerView.setLayoutManager(new SwipeCardsLayoutManager());
mAdapter = new CustomSwipeCardsAdapter(this, mList);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setCardsOutDuration(1000);
mRecyclerView.setSwipeCardsAnimatorEffect(SwipeCardsAnimatorEffect.ROTATION_IN_AND_OUT);
mRecyclerView.setOnCardsRemovedListener(this);
}
the SwipeCardsRecyclerView.OnCardsRemovedListener:
@Override public void onCardsRightRemoved(View itemView, int position) {
Log.e(TAG, "onCardsRightRemoved:" + position);
}@Override public void onCardsLeftRemoved(View itemView, int position) {
Log.e(TAG, "onCardsLeftRemoved:" + position);
}