Swipecards
Swipecards copied to clipboard
How can we have the cardstack effect like tinder or kikoso cardview
Hi How can we have the z index of the cardview having the next cards(At least stack effect of 3-4 cards) showing like the stack effect is there any solution which is already implemented please share the code snippet.
@Diolor can you take a look at this issue.
@alexwalterbos can you check out this issue please
I'm working on a branch that incorporates this. I don't know when that'll be done, as I'm busy otherwise.
@alexwalterbos Thanks man :+1: please get that feature asap possible and let us know thanks a ton.
@alexwalterbos please take a look at this lib this lib dont support prior to API level 19 other than that this is good example https://github.com/wenchaojiang/AndroidSwipeableCardStack
You do realize that this feature has no priority to me whatsoever, so I can make no promises regarding when it will be finished (even if I finish it at all)?
This would actually be a very nice effect if done
Stack effect would be nice!
I would love it too!
Same there
You can do something like this in your Adapter when you have set app:max_visible="3":
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
final float scalingFactor;
float translationFactor;
switch (mCurrentPosition) {
case 0:
scalingFactor = 1f;
translationFactor = v.getMeasuredHeight()*scalingFactor-v.getMeasuredHeight();
break;
case 1:
scalingFactor = 0.9f;
float topPosition = v.getTop();
translationFactor = v.getMeasuredHeight()*scalingFactor-v.getMeasuredHeight();
break;
case 2:
scalingFactor = 0.8f;
translationFactor = v.getMeasuredHeight()*scalingFactor-v.getMeasuredHeight();
break;
default:
scalingFactor = 1;
translationFactor = 0;
}
v.setScaleX(scalingFactor);
v.setScaleY(scalingFactor);
v.setTranslationY(translationFactor);
}
I'm still trying to figure out animations ;)
If someone still need this, please check my fork: https://github.com/antonkrasov/Swipecards Demo: https://youtu.be/yi7OXnJvUXE
@antonkrasov, Great solution, thank you!
@antonkrasov Thanks a lot, How can we put the cards stack visible in bottom instead of top?
@antonkrasov may be a noob question, but HOW do i use your fork instead of the diolor branch?
In the documentation you just copied the gradle part from diolor. Is your fork not on maven central? Or is there something I need to specify in my gradle file?