All Projects → Arjun-sna → Android Swipecards View

Arjun-sna / Android Swipecards View

Android library to implement cards stack view with swipe to remove feature

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Swipecards View

Stacklayout
Android 层叠卡片控件,仿"探探app"
Stars: ✭ 437 (+169.75%)
Mutual labels:  stack, swipe, card
CircularCardsStackView
CircularCardsStackView is an Android library for dealing with swipeable card views.
Stars: ✭ 30 (-81.48%)
Mutual labels:  stack, card
React Native Card Stack Swiper
Tinder like react-native card stack swiper
Stars: ✭ 315 (+94.44%)
Mutual labels:  swipe, card
Reswipecard
a light lib for swipe the cards implemented by RecyclerView
Stars: ✭ 230 (+41.98%)
Mutual labels:  swipe, card
Stacklayoutmanager
customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
Stars: ✭ 343 (+111.73%)
Mutual labels:  stack, card
React Native Deck Swiper
tinder like react-native deck swiper
Stars: ✭ 1,261 (+678.4%)
Mutual labels:  swipe, card
React Swipe Card
Tinder style swipe cards
Stars: ✭ 120 (-25.93%)
Mutual labels:  swipe, card
Swipelayout
A library what allows you to execute a swipe for the android platform
Stars: ✭ 150 (-7.41%)
Mutual labels:  swipe
Scheduler Card
HA Lovelace card for control of scheduler entities
Stars: ✭ 154 (-4.94%)
Mutual labels:  card
Android Cheat Sheet
Cheat Sheet for Android Interviews
Stars: ✭ 1,891 (+1067.28%)
Mutual labels:  stack
Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: ✭ 139 (-14.2%)
Mutual labels:  stack
Smartswipe
An android library to make swipe more easier and more powerful. Android各种侧滑,有这一个就够了
Stars: ✭ 1,911 (+1079.63%)
Mutual labels:  swipe
Redux Data Structures
Reducer factory functions for common data structures: counters, maps, lists (queues, stacks), sets, etc.
Stars: ✭ 157 (-3.09%)
Mutual labels:  stack
Vue Awesome Swiper
🏆 Swiper component for @vuejs
Stars: ✭ 12,072 (+7351.85%)
Mutual labels:  swipe
Chameleonmini Rebootedgui
Windows based GUI for Chameleon Mini, the contactless smartcard emulator (NFC/RFID)
Stars: ✭ 159 (-1.85%)
Mutual labels:  card
Uicard
Generic UI for card games like Hearthstone, Magic Arena and Slay the Spire...
Stars: ✭ 142 (-12.35%)
Mutual labels:  card
Vue Info Card
Simple and beautiful card component with an elegant spark line, for VueJS.
Stars: ✭ 159 (-1.85%)
Mutual labels:  card
Notistack
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
Stars: ✭ 2,562 (+1481.48%)
Mutual labels:  stack
Android Video Listing Mvp
Android video listing with swipe view tabs based on mvp design pattern with complete functionalities like search and sort
Stars: ✭ 151 (-6.79%)
Mutual labels:  swipe
Layerjs
layerJS: Javascript UI composition framework
Stars: ✭ 1,825 (+1026.54%)
Mutual labels:  swipe

SwipeCardsView Android Arsenal Download

Demo

Installation

repositories {
    jcenter()
}

dependencies {
    compile 'in.arjsna:swipecardlib:1.0.2'
}

Usage

Add SwipeCardView to the layout xml file where it is needed

<in.arjsna.swipecardlib.SwipeCardView
    android:id="@+id/frame"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    app:rotation_degrees="15.5"
    app:bottom_swipe_detect="false"
    tools:context=".CardSwipeActivity" />

The various customisation attribures available are

max_visible - maximum card to be show in stack as visible

min_adapter_stack - minimum card count left at which callback about adapter to empties will be called

left_swipe_detect - whether swipe to lelf should be enabled or not. true by default

right_swipe_detect - whether swipe to right should be enabled or not. true by default

top_swipe_detect - whether swipe to top should be enabled or not. true by default

bottom_swipe_detect - whether swipe to bottom should be enabled or not. true by default

Create an ArrayAdapter with card list

CardsAdapter arrayAdapter = new CardsAdapter(this, al );

Set the adapter and fling listener to SwipeCardView

SwipeCardView swipeCardView = (SwipeCardView) findViewById(R.id.swipe_card_view);
swipeCardView.setAdapter(arrayAdapter);
swipeCardView.setFlingListener(new SwipeCardView.OnCardFlingListener() {
            @Override
            public void onCardExitLeft(Object dataObject) {
              Log.i(TAG, "Left Exit");                
            }

            @Override
            public void onCardExitRight(Object dataObject) {
              Log.i(TAG, "Right Exit");
            }

            @Override
            public void onAdapterAboutToEmpty(int itemsInAdapter) {
              Log.i(TAG, "Adater to be empty");
              //add more items to adapter and call notifydatasetchanged
            }

            @Override
            public void onScroll(float scrollProgressPercent) {
              Log.i(TAG, "Scroll");
            }

            @Override
            public void onCardExitTop(Object dataObject) {
              Log.i(TAG, "Top Exit");
            }

            @Override
            public void onCardExitBottom(Object dataObject) {
              Log.i(TAG, "Bottom Exit");
            }
        });

The cards can be removed by code with fling animation

swipeCardView.throwRight(); //throw card to right
swipeCardView.throwLeft(); //throw card to left
swipeCardView.throwTop(); //throw card to top
swipeCardView.throwBottom(); //throw card to bottom

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].