# SwipeCardView **Repository Path**: tqxxx/SwipeCardView ## Basic Information - **Project Name**: SwipeCardView - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-07-04 - **Last Updated**: 2021-10-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SwipeCardView SwipeCardView是基于Diolor的[Swipecards](https://github.com/Diolor/Swipecards)控件改进实现,SwipeCardView是一个优雅的刷脸控件,滑动刷脸伴随渐变层叠动画,带来前所未有的滑动刷脸体验。   thanks Diolor [Swipecards](https://github.com/Diolor/Swipecards) ## Screenshot ![screen](https://github.com/xiepeijie/SwipeCardView/blob/master/ezgif.com.gif) ## Relative Project [SwipeAdapterView](https://github.com/xiepeijie/SwipeAdapterView) ## Usage ### XML: ``` ``` ### Java Code: ``` swipeView = (SwipeFlingAdapterView) findViewById(R.id.swipe_view); swipeView.setIsNeedSwipe(true);// 是否开启swipe滑动效果,当不调用此方法设置时,默认开启。 swipeView.setFlingListener(this); swipeView.setOnItemClickListener(this); ``` **onFlingListener** ``` @Override public void removeFirstObjectInAdapter() { adapter.remove(0); } @Override public void onLeftCardExit(Object dataObject) { // to do something } @Override public void onRightCardExit(Object dataObject) { // to do something } @Override public void onAdapterAboutToEmpty(int itemsInAdapter) { if (itemsInAdapter == 3) { loadData(); } } ``` **Click to swipe** ``` @Override public void onClick(View v) { // swipe left swipeView.swipeLeft(); // swipe right //swipeView.swipeRight(); } ``` # About me 微博:[@萧雾宇](http://weibo.com/payge)