I am using a CustomSlider in my app, and I have set it to be invisible.
When the user drags it or touches it (from top to bottom), my application needs to make the slider visible. Is this possible? How would I achieve it?
I needed to do this with an ImageView and still get touch events. The solution was to setAlpha(0.0f) to hide the image and still get events.
The touch event will be detected on the visible View
s of your activity. While a View
instance is hidden / invisible
, you cannot interact with it.
You need a motion handler on the parent view / visible view to determine whether you need to show the slider (in case the motion is vertical) or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With