| | |
| | | val type = intent.getIntExtra("type", 1) |
| | | val url = intent.getStringExtra("url") |
| | | if (type == 1) { |
| | | webView.loadData(url, "text/html; charset=utf-8", "utf-8") |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView.loadDataWithBaseURL(null, sHead + url, "text/html", "utf-8", null) |
| | | } else { |
| | | webView.loadUrl(url) |
| | | } |