protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_main); _cardStack = FindViewById <CardStack>(Resource.Id.container); _cardStack.ContentResource = Resource.Layout.card; //you can adjust swipe behaviour with your custom swipe listener _cardStack.CardEventListener = new MyCard.CardSwipeListener(Dp2Px(this, 100), _cardStack); //cardStack.setStackMargin(20); var cardAdapter = new CardsAdapter(ApplicationContext, Resource.Layout.card); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_1 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_2 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_3 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_4 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_5 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_6 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.android_img_7 }); cardAdapter.Add(new CardModel { ImgResId = Resource.Drawable.apple_vs_android_02 }); cardAdapter.OnTapButtonsEvent += OnButtonTap; cardAdapter.OnCardSwipeActionEvent += OnCardSwipeActionEvent; _cardStack.Adapter = cardAdapter; }
public CardSwipeListener(int discardDistancePx, CardStack cardStack) { _discardDistancePx = discardDistancePx; _cardStack = cardStack; }
public AnimatorListenerAdapterAnonymousInnerClass(CardStack outerInstance, int direction, View topView) { _outerInstance = outerInstance; _direction = direction; _topView = topView; }
public DataSetObserver(CardStack stack) { _stack = stack; }
public OnTouchListener(CardStack outerInstance, DragGestureDetector dd) { _outerInstance = outerInstance; _dd = dd; }
public DragListener(CardStack outerInstance) { _outerInstance = outerInstance; }