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.
我正在像SureLock这样的 android 中开发 kiosk APP ,我正面临处理 android 主页按钮长按事件的问题。请建议我如何处理主页按钮长按事件。
使用此答案中的代码来捕获主页按钮按下事件,并onKeyUp减去事件之间的时间并确定它是否是长按(我会说 1 秒?)
onKeyUp