Skip to content Skip to sidebar Skip to footer

Android Textisselectable Stops Textview Onclick Working Correctly

In my current Android application I have a MaterialCardView that wraps a TextView that I wish to be copyable e.g. I use android:textIsSelectable='true' However, I also need to kno

Solution 1:

In your case (with textIsSelectable="true") the TextView will still trigger an OnClick event. So you could simply add an OnClickListener to your TextView and link that to the existing CardView click behavior.

Would that cover your case?

Post a Comment for "Android Textisselectable Stops Textview Onclick Working Correctly"