Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通常在Android中,当您按下并释放按钮时,无论按钮应该做什么都会被激活。有没有办法改变这一点,以便在您只按下按钮时激活按钮应该做的事情?
使用OnTouchListener并检查ACTION_DOWN.
OnTouchListener
ACTION_DOWN