Swipeable-Cards
Swipeable-Cards copied to clipboard
Like and Unlike drawable images
Hello all, nice lib. I would like to add like/unlike heart-image (as in tinder app) to my project and I found private Drawable cardLikeImageDrawable; private Drawable cardDislikeImageDrawable;
but how it use? Is there any way to implement this features at this project version or its for the future release?
I have an idea. Why don't you just add it in the layout file and put it's visibility to "gone" by default and change it to "visible" while dismissing(onLike and onDislike)?
I have problem with the same question of eGorets. Is there any idea, How to implement such heart image (as in tinder app).
i also want these future in library, can you help me?
I gave answer to this in Issue #18
@seshuvinay : in which class you have added below lines?
((ImageView) getChildAt(getChildCount() - 1).findViewById( R.id.interested_image)).setVisibility(View.VISIBLE);
((ImageView) getChildAt(getChildCount() - 1).findViewById( R.id.not_interested_image)).setVisibility(View.VISIBLE);
@dhaval0122 You have to add those ImageViews in std_card_inner.xml layout and make them invisible by default. and while liking and disliking, you can add the above lines to make them visible.
And if you want exact functionality of tinder, you can put alpha of imageviews to 0 by default in xml file and increase and decrease it in in onTouchEvent of CardContainer class with movement of finger along x axis.
@seshuvinay I am struggle with this, please can u send mail for fixed code(lib/project). Email id - [email protected]
I made a gist of it working fine with Alpha, showing/hiding when moving and going back to alpha 0 when release. You can check it in https://gist.github.com/TiagoGouvea/5931d4aca56195683a21 The two included blocks on CardContainer.java have a comment line above, to easy locate.
@TiagoGouvea Works perfect for me :-) Thx.
i have tried it but having no success...can you please explain how can i get like or dislike effect... ?? that is java comment like above, to easy location ??
it is woking now.....it just a copy past... For those who are confused just go to CardContainer.Java and past the code...it works.. Thank you very much Bro !