开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜