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. }  
  • 相关阅读:
    codeforces 1349 A 思维
    codeforces 1358 D 尺区
    codeforces 1251D 二分+贪心
    codeforces 1260 D 二分
    codeforces 1167B 交互ez
    volatile
    计算多级集合/树/部门树的深度
    Java学习路线-知乎
    day06
    day01_虚拟机与主机之间ip配置
  • 原文地址:https://www.cnblogs.com/wcLT/p/8012725.html
Copyright © 2011-2022 走看看