rn-bounceable
rn-bounceable copied to clipboard
Change color on press and hold
@kanzitelli Good job on the library 👏
I was wondering if I could change the color on long press, how would that be achieved?
hey @peterlazar1993! Thank you!
Could you elaborate more on your use case?
But as I understood, you want to change background or highlight the object inside the Bounceable
component when it's long pressed. If so, I would recommend to put top-level View
inside the Bounceable
, and when onPress
function is called, change the bg color of that View
and use onLongPress
callback as you wish. Let me know if it helps!
I am trying to achieve something like this
I like the approach you mentioned, I shall try it!
@peterlazar1993 yeah that looks nice! i think it will be possible to do that with the approach mentioned before. I think for smooth colour changing you will need to use Animated View from reanimated. Let me know how it goes and that would be nice if you share your experience achieving that!