A tinder like swipeable card stack component

Overview

AndroidSwipeableCardStack

Android Arsenal

Change log:

  • provide option to infinitly swipe in a loop
  • card rotation setting
  • card gravity setting
  • undo animation

Thanks for contributions from: https://github.com/raee https://github.com/rebus007

image

A tinder like swipeable card stack component. Provide "swipe to like" effects. Easy to customize card views.

See youtube demo : https://www.youtube.com/watch?v=YsMnLJeouf8&feature=youtu.be A Demo App is also included in the source.

Installation

Use jitpack

repositories {
   maven { url "https://jitpack.io" }
}

dependencies {
   compile 'com.github.wenchaojiang:AndroidSwipeableCardStack:0.*.*'
}

OR manually

  1. Download released .aar file [Download current release] (https://github.com/wenchaojiang/AndroidSwipeableCardStack/releases/)

  2. put it into your project lib dir, "libs" for example.

  3. put following lines to your gradle.build file

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    compile(name:'android-card-stack-0.*.*', ext:'aar')
}

Configuration

Put CardStack in your layout file

<com.wenchao.cardstack.CardStack
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:gravity="center"
        android:padding="10dp"
        app:card_enable_loop="true"
        app:card_enable_rotation="true"
        app:card_gravity="top"
        app:card_margin="10dp"
        app:card_stack_size="4"/>

Create your card view layout file.

Example: card_layout.xml, contain only a TextView

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:id="@+id/content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
    />

</LinearLayout>

Implement your own adapter for the card stack. The CardStack will accept ArrayAdapter. The Following example extends a simple ArrayAdapter, overriding getView() to supply your customized card layout

public class CardsDataAdapter extends ArrayAdapter<String> {

    @Override
    public View getView(int position, final View contentView, ViewGroup parent){
        //supply the layout for your card
        TextView v = (TextView)(contentView.findViewById(R.id.content));
        v.setText(getItem(position));
        return contentView;
    }

}

Get the CardStack instance in your activity

  protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);

        mCardStack = (CardStack)findViewById(R.id.container);

        mCardStack.setContentResource(R.layout.card_content);
        mCardStack.setStackMargin(20);
        
  }

Finally, set the adapter

    mCardAdapter = new CardsDataAdapter(getApplicationContext(),0);
    mCardAdapter.add("test1");
    mCardAdapter.add("test2");
    mCardAdapter.add("test3");
    mCardAdapter.add("test4");
    mCardAdapter.add("test5");
    
    mCardStack.setAdapter(mCardAdapter);

Listening to card stack event

implement CardStack.CardEventListener, and set it as listener mCardStack.setListener(yourListener);

Class YourListener extends CardStack.CardEventListener{
    //implement card event interface
    @Override
    public boolean swipeEnd(int direction, float distance) {
        //if "return true" the dismiss animation will be triggered 
        //if false, the card will move back to stack
        //distance is finger swipe distance in dp
        
        //the direction indicate swipe direction
        //there are four directions
        //  0  |  1
        // ----------
        //  2  |  3
        
        return (distance>300)? true : false;
    }

    @Override
    public boolean swipeStart(int direction, float distance) {
    
        return true;
    }

    @Override
    public boolean swipeContinue(int direction, float distanceX, float distanceY) {
        
        return true;
    }

    @Override
    public void discarded(int id, int direction) {
       //this callback invoked when dismiss animation is finished. 
    }
    
    @Override
    public void topCardTapped() {
         //this callback invoked when a top card is tapped by user. 
    }
}
Comments
  • I want use this in api lever 14 but there are some error

    I want use this in api lever 14 but there are some error

    I want use this in api level 14.There are some error in Androidstudio. In class CardAnimator 54 line .
    baseLayout = new RelativeLayout.LayoutParams(baseLayout); there is no this method RelativeLayout.LayoutParams(RelativeLayout.LayoutParams source),in api level 14. Can you give some advise to me ?

    opened by yangyu5646 12
  • OutOfmemoryError from getContentView when Inflating

    OutOfmemoryError from getContentView when Inflating

    That happen when I open and close the activity several times, the memory is not freed

    01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: FATAL EXCEPTION: main 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: Process: com.swapcard.apps.android, PID: 25284 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: android.view.InflateException: Binary XML file line #144: Error inflating class 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:633) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.getContentView(CardStack.java:256) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.loadLast(CardStack.java:276) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.access$300(CardStack.java:20) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack$1.onAnimationEnd(CardStack.java:58) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardAnimator$3.onAnimationEnd(CardAnimator.java:180) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:854) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1171) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:722) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:738) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:580) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:549) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5430) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:607) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.getContentView(CardStack.java:256)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.loadLast(CardStack.java:276)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.access$300(CardStack.java:20)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack$1.onAnimationEnd(CardStack.java:58)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardAnimator$3.onAnimationEnd(CardAnimator.java:180)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:854)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1171)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:722)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:738)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:580)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:549)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5430)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: Caused by: java.lang.OutOfMemoryError: Failed to allocate a 64000012 byte allocation with 33554336 free bytes and 53MB until OOM 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at dalvik.system.VMRuntime.newNonMovableArray(Native Method) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:988) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.content.res.Resources.loadDrawableForCookie(Resources.java:2580) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.content.res.Resources.loadDrawable(Resources.java:2487) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.content.res.TypedArray.getDrawable(TypedArray.java:749) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.widget.ImageView.(ImageView.java:146) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.widget.ImageView.(ImageView.java:135) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.joooonho.SelectableRoundedImageView.(SelectableRoundedImageView.java:76) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.joooonho.SelectableRoundedImageView.(SelectableRoundedImageView.java:72) 01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Constructor.java:288)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:607)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.getContentView(CardStack.java:256)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.loadLast(CardStack.java:276)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack.access$300(CardStack.java:20)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardStack$1.onAnimationEnd(CardStack.java:58)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.wenchao.cardstack.CardAnimator$3.onAnimationEnd(CardAnimator.java:180)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:854)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1171)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:722)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:738)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:580)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:549)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5430)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913)  01-20 18:03:54.556 25284-25284/com.swapcard.apps.android E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706) 

    opened by samy-baili 8
  • Cannot remove padding

    Cannot remove padding

    There is always some padding in the card stack. I want the top card to fill up whole space, I want it to have match_parent as width and height. But I cannot do so, there is always some margin for the top card. Is there any way I can remove this?

    opened by sujan219 3
  • An event to move the cards programmatically

    An event to move the cards programmatically

    Hi, I would like to suggest an event that we can call, and the cards move, say fro eg .I have a button.setOnClickListener, i call this method inside it and the cards swipe.

    opened by kaabus 3
  • Just a question.

    Just a question.

    How to change the background color of the generated cards?I would like to set one color. If you could guide me to where the card background color is set or created. That would be appreciated. Cheers.

    opened by clem44 3
  • Undo a Swiped card

    Undo a Swiped card

    First of all, thanks for the awesome library. It is working wonderfully, however, I didn't find any way to undo a recently dismissed card. I want the last dismissed card to be displayed back on a click of a button, if user dismissed it accidentally.

    How should I do it?

    opened by rohannexialabs 3
  • Swiping up and down

    Swiping up and down

    In addition to the swiping left and right to "like" or "dislike" something, is it possible to also add the ability to swipe up and down for other actions?

    opened by vanshg 3
  • How do you change the size of the card

    How do you change the size of the card

    I tried to change the size of the card because it is too big for the phone.

    I tried changing the model card xml and I tried changing the xml for the card stack

    but it makes no difference the cards are always the same size. In the stack animation file it has match parent. Is that where the card is getting the default sizing from.

    Thanks

    opened by liveaffiliates 2
  • Invisibility for background cards

    Invisibility for background cards

    Hi,

    Is it possible from the existing API to hide the background cards?

    Sometime in my app, my top card has a transparent color. The background card cards' child views overlap with my top card child views. Is it possible to hide the background cards and let the top card be only visible at a time?

    opened by cprakashagr 2
  • How to add click events to items inside the card?

    How to add click events to items inside the card?

    I tried adding click listeners to certain items inside the card itself, bu it conflicts with the dragging event of the whole card. how can I do it without conflicting with the swiping events ?

    opened by silviahisham 2
  • Please remove the ix_launcher.png

    Please remove the ix_launcher.png

    Hi Great work,

    Can you please remove the ic_launcher.png file in the library and post it maven as an update. And how can trigger the swipe events on button clicks say 2 buttons left and right if i press left button card should swipe off to left edge of the screen and right button right edge of the screen.

    opened by ashokslsk 2
  • How to set PaddingTop and other Padding?

    How to set PaddingTop and other Padding?

    I know it needs to set android:padding="35dp",but it will be to the same,I want to change PaddingTop but not all the padding, please help me.

    opened by mofei666 0
  • Capability to add scrollview CardView

    Capability to add scrollview CardView

    Can we add the capability to add ScrollView inside CardView where the content can scroll vertically. Reference can be taken from from Bumble App Card View.

    opened by TechieSouls 0
  • I want to end activity

    I want to end activity

    hi, i want to end activity while all image are finish for example in card stack have 10 images if all images are over it will redirect to main activity please help me out

    opened by mustafamn 0
  • card stack as a recycler view item

    card stack as a recycler view item

    When I place the card stack as a item in recycler view and keep scrolling, the card stack's shadow effect at the edges keep doubled and tripled and a black border starts appearing. Screenshot attached. please help....

    screen shot 2018-09-25 at 02 16 58
    opened by ajitha3008 1
Releases(0.1.6)
Owner
wenchao jiang
wenchao jiang
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Frederik Schweiger 1.5k Dec 30, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
Rn-scratch-card - React Native Scratch Card which temporarily hides content from user

rn-scratch-card React Native Scratch Card which temporarily hides content from a

Sweatcoin 54 Jan 4, 2023
A simple implementation of swipe card like StreetView

A simple implementation of swipe card like StreetView!! DONATIONS This project needs you! If you would like to support this project's further developm

Michele Lacorte 831 Jan 4, 2023
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 2022
An Android library introducing a stack of Views with the first item being flippable.

FlippableStackView An Android library introducing a stack of Views with the first item being flippable. Views inside the stack remain the aspect ratio

Bartek Lipinski 812 Dec 7, 2022
Android Library to build a UI Card

Card Library Travis master: Travis dev: Card Library provides an easy way to display a UI Card using the Official Google CardView in your Android app.

Gabriele Mariotti 4.7k Dec 29, 2022
💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.

CreditCard View CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card. Displaying and en

Vinay Gaba 769 Dec 14, 2022
PCard Add payment card screen made using JetPack Compose

PCard Add payment card screen made using JetPack Compose Find this repository useful? ❤️ Support it by joining stargazers for this repository. ⭐ And f

Mohamed Elbehiry 61 Dec 16, 2022
Card with swipe options in Jetpack Compose

SwipeableActionCard Card with swipe options in Jetpack Compose Tutorial: Click Here Import SwipeableActionCard library Add this in project level build

Harsh Mahajan 1 Nov 23, 2021
Android App to Teach the Card Counting Skill

card-counting Android App to Teach the Card Counting Skill. The skill can be used to make more informed decisions while playing games like Blackjack.

Jamie Flynn 1 Dec 30, 2021
Simple card app for Udacity's Android Basics: User Interface course

just-because-card Simple card app for Udacity's Android Basics: User Interface c

null 0 Jan 6, 2022
Android Card-Library

Android Card-Library Technology Stack Android Studio Bumblebe

Eraño Payawal 7 Jul 28, 2022
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

Joan Zapata 2.8k Dec 16, 2022
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.

BottomBar (Deprecated) I don't have time to maintain this anymore. I basically wrote the whole library in a rush, without tests, while being a serious

Iiro Krankka 8.4k Dec 29, 2022
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Dec 6, 2022
Library and example project on how to use the UITableView component

UITableView for Android Usage Installation Android Studio Paste or clone this library into the /libs folder, in the root directory of your project. Cr

Thiago Locatelli 679 Nov 11, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Component Box - a multiplatform server-driven UI framework

Component Box · Component Box is a multiplatform server-driven UI framework. Learn how to use Component Box in your project. Installation implementati

Dropbox 216 Dec 31, 2022