开发者

Detecting if screen can send touch events or not on Android?

开发者 https://www.devze.com 2023-02-18 04:27 出处:网络
How do I detect whether or not the screen on an android device is a touchscreen? I don\'t want to force the user to \"press here\" and see if I get an event, I\'d like to detect it without asking the

How do I detect whether or not the screen on an android device is a touchscreen?

I don't want to force the user to "press here" and see if I get an event, I'd like to detect it without asking the user to do开发者_JAVA技巧 anything.


You can use the hasSystemFeature method of the PackageManager class to check for FEATURE_TOUCHSCREEN

0

精彩评论

暂无评论...
验证码 换一张
取 消