zoukankan      html  css  js  c++  java
  • androidwebview timeout

    1. public class MyWebViewClient extends WebViewClient {  
    2.     boolean timeout;  
    3.    
    4.     public MyWebView() {  
    5.         timeout = true;  
    6.     }  
    7.    
    8.     @Override  
    9.     public void onPageStarted(WebView view, String url, Bitmap favicon) {  
    10.         new Thread(new Runnable() {  
    11.             @Override  
    12.             public void run() {  
    13.                 try {  
    14.                     Thread.sleep(1000);  
    15.                 } catch (InterruptedException e) {  
    16.                     e.printStackTrace();  
    17.                 }  
    18.                 if(timeout) {  
    19.                     // do what you want  
    20.                 }  
    21.             }  
    22.         }).start();  
    23.     }  
    24.    
    25.     @Override  
    26.     public void onPageFinished(WebView view, String url) {  
    27.         timeout = false;  
    28.     }  
    29. http://blog.csdn.net/dreamer0924/article/details/8640797
    30. }  
  • 相关阅读:
    第三周作业
    第二周作业 编程总结
    编程总结二 求最大值及其下标
    编程总结一 查找整数
    第十周课程总结
    第九周课程总结&实验报告(七
    第八周课程总结&实验报告(六)
    第七周课程总结&实验报告(五)
    第六周&java实验报告四
    第五周的作业
  • 原文地址:https://www.cnblogs.com/wcLT/p/8012725.html
Copyright © 2011-2022 走看看