Disable click link or button in a webview Android

前端 未结 3 776
长发绾君心
长发绾君心 2021-01-03 12:54

I have a webview load URL \"http://www.google.com\"..I want disable event when we click link or button in that webview..I set clickable=\"false\" but not work..

3条回答
  •  失恋的感觉
    2021-01-03 13:20

    No idea to disable HTML Native button in webview but you can disable link

    public class formatHTML {
        public static String changeHTMLFormat(String htmlObject){
            String result = "", CSSCoding = "";
    
            CSSCoding = htmlObject;
            CSSCoding = CSSCoding.replaceAll("<[aA].*?>", "");
            CSSCoding = CSSCoding.replaceAll("", "");
            return CSSCoding;
        }     
    }
    

提交回复
热议问题