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

<tfoot id='rrAt4'></tfoot>

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

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

  2. <legend id='rrAt4'><style id='rrAt4'><dir id='rrAt4'><q id='rrAt4'></q></dir></style></legend>

    1. Webview 在選擇框或任何對話框上崩潰

      Webview crashes on select box or any Dialog(Webview 在選擇框或任何對話框上崩潰)

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

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

            <tbody id='pUVxy'></tbody>
          1. <tfoot id='pUVxy'></tfoot>

                <legend id='pUVxy'><style id='pUVxy'><dir id='pUVxy'><q id='pUVxy'></q></dir></style></legend>
                本文介紹了Webview 在選擇框或任何對話框上崩潰的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有一個應用程序,單擊列表中的項目會顯示注入了 javascript 的 webview.我需要保存 webview 對象,以便當用戶再次按下相同的項目時,會顯示現(xiàn)有的 webview,而不是重新加載它并注入再次使用javascript.我可以將webview對象保存在應用程序類中webview的Arraylist中.

                I have an application where clicking on an item in a list shows webview with javascript injected.I need to save the webview object so that when the user presses the same item again the existing webview is shown instead of reloading it and injecting the javascript again.I am able to save the webview object in Arraylist of webview inside the application class.

                我檢查該項目是否已存在于 Arraylist 中,如果存在,則獲取相應的對象并將該對象設置為活動的內(nèi)容,如下所示.

                I check whether the item already exists in the Arraylist and if it do exists take the corresponding object and set the object as the content of the activity as shown below.

                     temp_WebView=new WebView(this);                
                     temp_WebView=(WebView)application.getWebview(j);
                     ViewGroup parent = (ViewGroup) application.getWebview(j).getParent();
                     parent.removeView(application.getWebview(j));  
                     setContentView(temp_WebView);
                
                This works fine but when clicking on any of the select box inside the webview where a dialog is populated it gets crashed  with the following error,
                
                
                WARN/WindowManager(60): Attempted to add application window with unknown token HistoryRecord{4506d1e8 tabviewapp.com/.Webresults}.  Aborting.
                
                 DEBUG/AndroidRuntime(500): Shutting down VM
                
                 WARN/dalvikvm(500): threadid=1: thread exiting with uncaught exception (group=0x4001d800)    
                 ERROR/AndroidRuntime(500): FATAL EXCEPTION: main    
                 ERROR/AndroidRuntime(500): android.view.WindowManager$BadTokenException: Unable to  add window -- token android.os.BinderProxy@45034510 is not valid; is your activity running?
                 ERROR/AndroidRuntime(500): at android.view.ViewRoot.setView(ViewRoot.java:505)
                 ERROR/AndroidRuntime(500): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
                
                 ERROR/AndroidRuntime(500):  at      android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
                
                 ERROR/AndroidRuntime(500):     at android.view.Window$LocalWindowManager.addView(Window.java:424)
                
                 ERROR/AndroidRuntime(500):     at android.app.Dialog.show(Dialog.java:241)
                
                 ERROR/AndroidRuntime(500):     at android.webkit.WebView$InvokeListBox.run(WebView.java:7095)
                
                 ERROR/AndroidRuntime(500):     at android.os.Handler.handleCallback(Handler.java:587)
                
                 ERROR/AndroidRuntime(500):     at android.os.Handler.dispatchMessage(Handler.java:92)
                
                 ERROR/AndroidRuntime(500):     at android.os.Looper.loop(Looper.java:123)
                
                 ERROR/AndroidRuntime(500):     at android.app.ActivityThread.main(ActivityThread.java:4627)
                
                 ERROR/AndroidRuntime(500):     at java.lang.reflect.Method.invokeNative(Native Method)
                
                 ERROR/AndroidRuntime(500):     at java.lang.reflect.Method.invoke(Method.java:521)
                
                 ERROR/AndroidRuntime(500):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
                
                 ERROR/AndroidRuntime(500):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
                
                 ERROR/AndroidRuntime(500):     at dalvik.system.NativeStart.main(Native Method)
                
                 WARN/ActivityManager(60):   Force finishing activity tabviewapp.com/.Webresults
                

                我認為問題在于 webview 的上下文,但無法弄清楚如何為現(xiàn)有對象設置上下文或?qū)⑸舷挛膫鬟f給 webview 內(nèi)部生成的對話框.

                I think the problem is with the context of the webview but not able to figure out how to set the context for the existing object or pass context to dialog generated inside the webview.

                提前致謝.

                推薦答案

                我遇到了類似的問題.在我的例子中,webview 在一個 ActivityGroup 中.ActivityGroups 和對話框不能開箱即用.在我的情況下,我必須不使用它作為上下文,而是使用 getParent().

                I had a similar problem. In my case the webview was in an ActivityGroup. ActivityGroups and dialogs don't work out of the box. In my case I had to not use this as context, instead use getParent().

                temp_WebView=new WebView(getParent());
                

                這篇關于Webview 在選擇框或任何對話框上崩潰的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                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(如何檢測位置提供者?GPS 或網(wǎng)絡提供商)
                Get current location during app launch(在應用啟動期間獲取當前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                <legend id='lURAh'><style id='lURAh'><dir id='lURAh'><q id='lURAh'></q></dir></style></legend>
                • <bdo id='lURAh'></bdo><ul id='lURAh'></ul>

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

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

                            <tbody id='lURAh'></tbody>
                          主站蜘蛛池模板: 亚洲激情久久 | 久久免费精品 | 精品国产久 | 伊人在线 | 国产一区二区在线看 | 欧美一级全黄 | 9l视频自拍九色9l视频成人 | 九九久久精品视频 | 综合色婷婷一区二区亚洲欧美国产 | h片在线观看免费 | 亚洲一区二区三区四区在线 | 青娱乐福利视频 | 亚洲国产成人91精品 | 欧美日一区二区三区 | 亚洲永久免费 | 亚洲精品中文字幕乱码三区91 | 国产理论片| 国产资源视频 | 91福利网站| 女同一区二区 | 看片地址 | 久久久精品国产sm调教 | 日本免费一级 | 久草免费福利视频 | 欧美一级淫片免费视频魅影视频 | 免费看色片 | 日本久久精品视频 | 日韩天堂av | 黄色三级免费 | 国产一区二区三区久久 | 欧美日韩一区二 | 国产黄视频在线观看 | 亚洲第一区在线观看 | 一区二区三区高清 | 国产精品久久久久久久久久久久久久 | 日韩视频在线观看 | 日本熟妇毛耸耸xxxxxx | 欧美一区二区三区免费 | 精品1区2区| 久草青青草 | 五月天网址 |