android - How to Make WebView Clickable False and True -


i using web view in application every thing working fine me, having small problem. when url contains disclaimers should not allow web-view should clickable. in other cases web-view should clickable.

 @override public boolean shouldoverrideurlloading(webview view, string url) {                     if(url.contains("disclaimers")){                         view.setclickable(false);                          //here clickable should fasle.                          return true;                     }else{                         // in clickable should true.                         view.setclickable(true);                          if(!url.contains("/home.mvc/trade")){                             showprogresslayout();                         }               if(url.contains("/home.mvc/trade")){                             opentradescreen(url);                         }else{                             view.loadurl(url);                          }                                          return true;                     }                 } 

try view.setenabled(false); stop user interaction on webview. sure view.setclickable(true); not work properly.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -