“Press and hold” button on Android needs to change states (custom XML selector) using onTouchListener
问题 I've got a button graphic which needs to have "press and hold" functionality, so instead of using onClickListener, I'm using onTouchListener so that the app can react to MotionEvent.ACTION_DOWN, and MotionEvent.ACTION_UP Depending on how quickly those two events are triggered, I can run a "pressAndHoldHandler" in the time between the two. Anyway, long story short: I have numerous "basic" buttons in the same app that don't require the press and hold functionality, so they are using the