UI feedback on touch / tap event


#1

Is there a way to enable a native ui feedback for touchable elements (buttons, list items, ecc…) on tap event (e.g. the ripple effect on Android) ?


#2

There may be some way to do it natively, since NativeScript runs on each platform’s specific environment. I haven’t tried it, but I do now there’s a plugin for the Ripple Effect you mention: https://github.com/bradmartin/nativescript-ripple
and it’s pretty good. As for the general question, if I find something I’ll be sure to let you know :slight_smile:


#3

Thank you @BryanYomar , I had already come across that plugin but I would discard this option because:

  • I prefer to contain the external plugins number used in my project and use platform’s features instead (due to maintenance reliability)
  • Ripple’s effect is now the native tap ui feedback used by material design, but not by iOs, and it might be replaced in the future by another kind of feedback even on Android itself

So it would be great if NativeScript touchable items (e.g. ListItem ) could come with an option to enable / disable the underground specific platform feedback on touch.


#4

That’s exactly right. Using native components to manage is a better option for maintenance reasons, I completely understand that.
I remember a while ago, I tried something similar. A flat button on Android wasn’t doing the ripple effect. It surely would help if a feature like the one you suggest gets implemented.


#5

Ok, I think I will submit a feature request to the team! Thank you anyway :thumbsup:


#6

FYI: https://github.com/NativeScript/docs/issues/829#issuecomment-314045090