Android - simple touch event management
<p>I've got a component that I want to make various changes to content and display when touched, and revert when the finger goes back up.  The following works in general, but if the user's finger wanders out off the component itself before lifting, ACTION_UP never fires, so it never reverts to the "up" state.</p>

<pre><code>public class MyComponent extends SomeLayout {
    // ... stuff
    @Override
    public boolean onTouchEvent(MotionEvent event) {
        final int action = event.getAction() &amp; MotionEvent.ACTION_MASK;
        switch (action) {
        case MotionEvent.ACTION_DOWN :
            // do something...
            break;          
        case MotionEvent.ACTION_UP :
            // do something else...
            break;      
        }   
        return super.onTouchEvent(event);
    }
}
</code></pre>

<p>This ViewGroup has complex content, and is not something that'd be appropriate for StateDrawables.</p>

<p>Any suggestions?</p>

<p>TYIA</p>
