3

Before downvote this question first read my question proper.

I need ripple effect on textview click only for it's text not for its background.

I am using this

android:background="?attr/selectableItemBackground"

but it shows effect with its background. I have already used xml file using ripple tag but same thing happened.

So instead effect on background of textview with ripple effect how can i set it to only for its text?

Advanced help would be appreciated !

  • use `android:textColor="?attr/selectableItemBackground"` instead of background. – Hemant Parmar Jan 18 '18 at 07:55
  • It will not work. By using that my desire text will not show and also not its color too. –  Jan 18 '18 at 07:57
  • You can change textColor on click but I doubt you can achieve some kind of ripple effect on text easily – egoldx Jan 18 '18 at 07:57
  • I am wondering for it. –  Jan 18 '18 at 07:58
  • This ripple effect as is, is drawing above first available background. You will have write yourselft some custom animation. You can probably start here: https://stackoverflow.com/questions/2680607/text-with-gradient-in-android to use gradient as textColor – egoldx Jan 18 '18 at 08:02
  • Ripple animation or simple animation ?? –  Jan 18 '18 at 08:05

0 Answers0