android Vibrator使用示例
来源:互联网 发布:两个数最大公约数c语言 编辑:程序博客网 时间:2024/06/05 10:40
android Vibrator使用示例
(2012-08-01 00:05:29)转载▼
标签:
android
it
vibrator
振动器
杂谈
分类: android使用Vibrator的vibrate()可调节震动时间;cancel()取消震动。
<uses-permission android:name="android.permission.VIBRATE"/>
//振动器实例化
private Vibrator mVibrator1;
mVibrator1=(Vibrator) getApplication().getSystemService(Service.VIBRATOR_SERVICE);
//等待100ms后,按数组所给数值间隔震动;其后为重复次数,-1为不重复,0一直震动
mVibrator1.vibrate(new long[]{100,10,100,1000}, -1);
//震动指定时间
mVibrator1.vibrate(2000);
//取消震动
mVibrator1.cancel();
0 0
- android Vibrator使用示例
- Android小知识——Vibrator使用示例
- Android小知识——Vibrator使用示例
- android Vibrator 使用
- Android Vibrator的使用
- Android Vibrator的使用
- Android Vibrator的使用
- android-Vibrator的使用
- android-Vibrator的使用
- android Vibrator 使用
- Android Vibrator的使用
- Android Vibrator的使用
- android Vibrator 使用
- android Vibrator 使用
- android Vibrator 振动使用
- Android之Vibrator使用。
- android Vibrator 使用
- Android Vibrator的使用
- scanf()函数用法小结
- Android 智能问答机器人的实现
- csu1290_Random Integers
- Service生命周期以及Service类onStartCommand的返回值问题
- log4cxx的使用
- android Vibrator使用示例
- Linux 上的基础网络设备详解
- mysql字符集及乱码问题
- Recursive sum in parent-child hierarchy T-SQL
- parent-childRecursive sum in parent-child hierarchy T-SQL
- Numpy教程
- C++ Primer Plus 第六版 8.2 答案
- mysql字符集修改方法&中文乱码问题
- glFlush,glFinish和SwapBuffers用法