AleSpero / ExpandableCardView

Simple expandable CardView for Android.
Apache License 2.0
689 stars 88 forks source link

click to expand #42

Open LAIMX opened 5 years ago

LAIMX commented 5 years ago

hi! I appreciate that you provide this library. ExpandableCardView is definitely useful for me. But I have a question about clicking to expand.

When I click the arrow_button, the card would be expanded, also when click the title area, it would be expanded. But what I want is only click the arrow_button, and then expanded. but clicking other area would not be expanded. so, could you guys provide me some solution for this issues?

Thanks alot!

Derek

JavaDeveloper08 commented 4 years ago

Hi LAIMX, I have same problem too, did you solve it ?

JavaDeveloper08 commented 4 years ago

Hi LAIMX, I solved problem,

If you change code like that ;

if(expandOnClick){ header.setOnClickListener(defaultClickListener); arrowBtn.setOnClickListener(defaultClickListener); }

This code runs both header and arrow icon press, If you want only arrow icon press, you may remove "header.setOnClickListener(defaultClickListener); " line.

Best,