简体   繁体   中英

Android onTouch and Vibration Class Combining

First , my English is not so good. Please use a plain language if you give answers.

I'm trying to make an app that vibrates when the user touches the screen, and stops vibrating when they remove their fingers. But the vibration class takes a value in milliseconds, and I don't know at the start how long it will need to vibrate for. How can I make it vibrate until the user's fingers are removed?

也许尝试一个循环调用振动 1 毫秒,直到用户抬起他们的手指。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM