android 觸屏的震動(dòng)響應(yīng)接口調(diào)用方法
更新時(shí)間:2012年11月23日 15:34:45 作者:
android 相關(guān)開發(fā)過程中,經(jīng)常會(huì)使用到觸屏的震動(dòng)響應(yīng)接口,為此本文列出以下方法,想要了解的朋友可以參考下
調(diào)用native 方法來開啟和關(guān)閉vibrator:
native static void vibratorOn(long milliseconds);
native static void vibratorOff();
調(diào)用方法如下:
VibratorService.vibratorOn()
native static void vibratorOn(long milliseconds);
native static void vibratorOff();
調(diào)用方法如下:
VibratorService.vibratorOn()
相關(guān)文章
Android普通應(yīng)用升級為系統(tǒng)應(yīng)用并獲取系統(tǒng)權(quán)限的操作
這篇文章主要介紹了Android普通應(yīng)用升級為系統(tǒng)應(yīng)用并獲取系統(tǒng)權(quán)限的操作,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-03-03
android?scrollview頂部漸漸消失實(shí)現(xiàn)實(shí)例詳解
這篇文章主要為大家介紹了android?scrollview頂部漸漸消失實(shí)現(xiàn)實(shí)例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-11-11
Android中DialogFragment自定義背景與寬高的方法
DialogFragment 彈出框默認(rèn)是在屏幕的中央,左右還有留白,那么如何自定義背景和寬高呢?下面這篇文章就來給大家介紹了關(guān)于Android中DialogFragment自定義背景與寬高的方法,需要的朋友可以參考下。2017-08-08
Android 實(shí)現(xiàn)帶進(jìn)度條的WebView的實(shí)例
這篇文章主要介紹了Android 實(shí)現(xiàn)帶進(jìn)度條的WebView的實(shí)例的相關(guān)資料,這里介紹了Webview加載網(wǎng)頁的方法及帶進(jìn)度的Drawable文件view_progress_webview的實(shí)現(xiàn),需要的朋友可以參考下2017-07-07
Android入門之在Activity之間穿梭的Intent
Intent可以用來啟動(dòng)Activity(startActivity(Intent))、Serveice(startService(Intent))等組件,可以用來綁定Activity和Service以建立它們之間的通信(bindServiceConnaction(Intent,ServiceConnection,int)),可以作為Broadcast Intent發(fā)送給廣播接收器2021-10-10

