久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='rKqcO'></small><noframes id='rKqcO'>

    <tfoot id='rKqcO'></tfoot>

    <legend id='rKqcO'><style id='rKqcO'><dir id='rKqcO'><q id='rKqcO'></q></dir></style></legend>
    <i id='rKqcO'><tr id='rKqcO'><dt id='rKqcO'><q id='rKqcO'><span id='rKqcO'><b id='rKqcO'><form id='rKqcO'><ins id='rKqcO'></ins><ul id='rKqcO'></ul><sub id='rKqcO'></sub></form><legend id='rKqcO'></legend><bdo id='rKqcO'><pre id='rKqcO'><center id='rKqcO'></center></pre></bdo></b><th id='rKqcO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rKqcO'><tfoot id='rKqcO'></tfoot><dl id='rKqcO'><fieldset id='rKqcO'></fieldset></dl></div>
      <bdo id='rKqcO'></bdo><ul id='rKqcO'></ul>

        onUserInteraction 在 DialogPreference 中不起作用

        onUserInteraction not working in DialogPreference(onUserInteraction 在 DialogPreference 中不起作用)

            <tfoot id='zEcUy'></tfoot>
              <bdo id='zEcUy'></bdo><ul id='zEcUy'></ul>

                <tbody id='zEcUy'></tbody>
              <legend id='zEcUy'><style id='zEcUy'><dir id='zEcUy'><q id='zEcUy'></q></dir></style></legend>
                  <i id='zEcUy'><tr id='zEcUy'><dt id='zEcUy'><q id='zEcUy'><span id='zEcUy'><b id='zEcUy'><form id='zEcUy'><ins id='zEcUy'></ins><ul id='zEcUy'></ul><sub id='zEcUy'></sub></form><legend id='zEcUy'></legend><bdo id='zEcUy'><pre id='zEcUy'><center id='zEcUy'></center></pre></bdo></b><th id='zEcUy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zEcUy'><tfoot id='zEcUy'></tfoot><dl id='zEcUy'><fieldset id='zEcUy'></fieldset></dl></div>

                  <small id='zEcUy'></small><noframes id='zEcUy'>

                • 本文介紹了onUserInteraction 在 DialogPreference 中不起作用的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  預(yù)計(jì) onUserInteraction 將被調(diào)用以進(jìn)行任何用戶交互.它在 PreferenceActivity 中運(yùn)行良好.但是,當(dāng)彈出 DialogPreference 時(shí),即使有觸摸事件等用戶交互,也不會(huì)再調(diào)用 onUserInteraction.

                  It is expected that onUserInteraction is being called for any user interaction. it works fine in PreferenceActivity. However, when a DialogPreference is popup, onUserInteraction is not called anymore even there is user interaction such as touch event.

                  DialogPreference 似乎不是唯一的情況.每當(dāng)顯示 Dialog 時(shí),它都不會(huì)將用戶交互報(bào)告給活動(dòng).

                  It seems that DialogPreference is not the only case. Whenever Dialog is shown, it does not report the user interaction to activity.

                  但是,如果我真的需要它,我該怎么辦.謝謝.

                  But what can I do if I really need it. Thank You.

                  推薦答案

                  據(jù)我所知,onUserInteraction() 在用戶與對(duì)話框交互時(shí)根本不會(huì)被調(diào)用(甚至從Activity,您在其中監(jiān)視交互).

                  As far as I know, the onUserInteraction() is simply not called while the user is interacting with a dialog (even started from Activity in which you're monitoring interactions).

                  我知道的兩個(gè)解決方案是:

                  Two solutions I know are:

                  • 子類(lèi) Dialog/DialogPreference 類(lèi)并覆蓋 dispatchTouchEvent().

                  實(shí)現(xiàn)Window.Callback接口并將其設(shè)置為Dialog的窗口回調(diào),發(fā)出:

                  Implement Window.Callback interface and set it as Dialogs window callback by issuing:

                  dialog.getWindow().setCallback(callbackImplementation);
                  

                  注意:此實(shí)現(xiàn)應(yīng)通過(guò)調(diào)用適當(dāng)?shù)膶?duì)話框方法來(lái)處理所有接收到的事件,或以您自己的方式處理事件(例如通過(guò)手動(dòng)調(diào)用 onUserInteraction()).

                  Note: this implementation should process all received events by calling appropriate dialog methods or handle the events in your own way (e.g. by manually calling onUserInteraction()).

                  編輯

                  您有幾種方法可以從自定義 PreferenceDialog 實(shí)例中獲取 Activity.

                  You have couple of ways to get Activity from the custom PreferenceDialog instance.

                  1. 調(diào)用返回PreferenceManagerDialogPreference.getPreferenceManager()方法.它有一個(gè) getActivity() 方法 但它是包私有的 所以你必須把你的自定義 DialogPreference 放在 android.preference 包來(lái)訪問(wèn)它.

                  1. Call DialogPreference.getPreferenceManager() method which returns PreferenceManager. It has a getActivity() method but it's package-private so you would have to put your custom DialogPreference in android.preference package to access it.

                  PreferenceActivity.onCreate() 中,填充首選項(xiàng)后,使用 findPreference() 找到您的自定義 DialogPreference鑰匙.然后將其轉(zhuǎn)換為您的自定義類(lèi)并通過(guò)訪問(wèn)器將活動(dòng)設(shè)置為 this.

                  In the PreferenceActivity.onCreate(), after inflating the preferences, use findPreference() to find your custom DialogPreference by key. Then cast it to your custom class and set activity to this via an accessor.

                  我會(huì)選擇第二個(gè)選項(xiàng).

                  這篇關(guān)于onUserInteraction 在 DialogPreference 中不起作用的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測(cè)位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                  Get current location during app launch(在應(yīng)用啟動(dòng)期間獲取當(dāng)前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                    <tbody id='V0n9z'></tbody>
                • <legend id='V0n9z'><style id='V0n9z'><dir id='V0n9z'><q id='V0n9z'></q></dir></style></legend>

                        <bdo id='V0n9z'></bdo><ul id='V0n9z'></ul>
                        <tfoot id='V0n9z'></tfoot>
                        • <small id='V0n9z'></small><noframes id='V0n9z'>

                          <i id='V0n9z'><tr id='V0n9z'><dt id='V0n9z'><q id='V0n9z'><span id='V0n9z'><b id='V0n9z'><form id='V0n9z'><ins id='V0n9z'></ins><ul id='V0n9z'></ul><sub id='V0n9z'></sub></form><legend id='V0n9z'></legend><bdo id='V0n9z'><pre id='V0n9z'><center id='V0n9z'></center></pre></bdo></b><th id='V0n9z'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='V0n9z'><tfoot id='V0n9z'></tfoot><dl id='V0n9z'><fieldset id='V0n9z'></fieldset></dl></div>
                            主站蜘蛛池模板: 欧美成人自拍视频 | 欧美日韩精品免费观看 | 精品国产一区探花在线观看 | 亚洲精品一区在线 | 中文字幕日韩欧美 | 亚洲精品一区中文字幕 | 狠狠涩 | 一级欧美一级日韩片免费观看 | 精品99久久 | 本道综合精品 | 韩日在线观看视频 | 日韩精品久久一区二区三区 | 亚洲免费在线视频 | 久久精品久久久 | 色婷婷av一区二区三区软件 | 国产一区二区三区在线免费 | 日韩成人在线观看 | 欧美精品一区在线发布 | 日本不卡一区二区三区 | 国内精品免费久久久久软件老师 | 伊人网站在线观看 | 日韩在线中文字幕 | 精产国产伦理一二三区 | 天天操夜夜操 | 久久久久国产精品一区二区 | 成人福利在线 | 日韩精品一区二区三区第95 | 精品久久国产老人久久综合 | 久久久久久av | 国内在线视频 | 亚洲一区精品视频 | 国产一区 在线视频 | 国产精品中文字幕在线 | 91精品国产综合久久久久 | 久久久久久久久久久久91 | 99亚洲 | 国产精品视频专区 | 国产精品自拍视频 | 羞羞网站在线免费观看 | 日本在线免费看最新的电影 | 日韩视频精品在线 |