Swipeable-Cards icon indicating copy to clipboard operation
Swipeable-Cards copied to clipboard

Like and Unlike drawable images

Open eGorets opened this issue 10 years ago • 11 comments

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?

eGorets avatar Sep 07 '14 13:09 eGorets

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)?

seshuvinay avatar Sep 16 '14 12:09 seshuvinay

I have problem with the same question of eGorets. Is there any idea, How to implement such heart image (as in tinder app).

katikarganesh avatar Sep 18 '14 06:09 katikarganesh

i also want these future in library, can you help me?

dhaval0122 avatar Sep 18 '14 14:09 dhaval0122

I gave answer to this in Issue #18

seshuvinay avatar Sep 26 '14 05:09 seshuvinay

@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 avatar Oct 13 '14 10:10 dhaval0122

@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 avatar Oct 17 '14 12:10 seshuvinay

@seshuvinay I am struggle with this, please can u send mail for fixed code(lib/project). Email id - [email protected]

SakthivelA avatar Nov 29 '14 11:11 SakthivelA

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 avatar Mar 11 '15 13:03 TiagoGouvea

@TiagoGouvea Works perfect for me :-) Thx.

styssi avatar Apr 19 '15 12:04 styssi

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 ??

ahmadmiraj avatar Dec 16 '15 15:12 ahmadmiraj

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 !

ahmadmiraj avatar Dec 16 '15 15:12 ahmadmiraj