Detect "no longer touching" event

joseluis

Active Member
Licensed User
Longtime User
I have a scrollview, and when one of its panels are touched, I want its color to change, and restore the original color when the finger moves away. Like when you press a row in any Preferences window and it highlights.

I read the ACTION_DOWN event, and change the color accordingly. And on ACTION_UP and ACTION_MOVE I restore the color again.

The problem comes when the finger moves away from the panel at enough speed than the ACTION_MOVE is not triggered and the color is not changed back.

Do you have any ideas to get the behavior that I want?
 

joseluis

Active Member
Licensed User
Longtime User
Now it's occuring to me that I'm thinking on this all wrong.

I didn't thought that Panels could also have a Pressed State that I can associate an image to, the same way as with buttons... I'll check if that's true.
 
Upvote 0

joseluis

Active Member
Licensed User
Longtime User
Sometimes there's nothing like stating a problem outloud to immediately think of the solution. I've confirmed that changing the panel background like in the NinePatch example has the desired behaviour. Thanks anyway NJDude
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…