Java 类android.webkit.WebSettings.RenderPriority 实例源码
项目:touchtestweb-android
文件:PrivacyPolicyActivity.java
@Override
@SuppressLint("SetJavaScriptEnabled")
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_privacy_policy);
final WebView privacyPolicyWebView = (WebView)findViewById(R.id.privacypolicy);
privacyPolicyWebView.setVisibility(View.VISIBLE);
privacyPolicyWebView.getSettings().setJavaScriptEnabled(true);
privacyPolicyWebView.getSettings().setRenderPriority(RenderPriority.HIGH);
privacyPolicyWebView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
privacyPolicyWebView.setWebViewClient(new WebViewClient() { });
privacyPolicyWebView.resumeTimers();
privacyPolicyWebView.loadUrl("http://www.soasta.com/privacy-policy");
}
项目:letv
文件:PKDialog.java
@SuppressLint({"SetJavaScriptEnabled"})
private void initViews() {
this.mWebView.setVerticalScrollBarEnabled(false);
this.mWebView.setHorizontalScrollBarEnabled(false);
this.mWebView.setWebViewClient(new FbWebViewClient());
this.mWebView.setWebChromeClient(this.mChromeClient);
this.mWebView.clearFormData();
WebSettings settings = this.mWebView.getSettings();
settings.setSavePassword(false);
settings.setSaveFormData(false);
settings.setCacheMode(-1);
settings.setNeedInitialFocus(false);
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
settings.setRenderPriority(RenderPriority.HIGH);
settings.setJavaScriptEnabled(true);
if (!(this.mWeakContext == null || this.mWeakContext.get() == null)) {
settings.setDatabaseEnabled(true);
settings.setDatabasePath(((Context) this.mWeakContext.get()).getApplicationContext().getDir("databases", 0).getPath());
}
settings.setDomStorageEnabled(true);
this.jsBridge.a(new JsListener(), "sdk_js_if");
this.mWebView.clearView();
this.mWebView.loadUrl(this.mUrl);
this.mWebView.getSettings().setSavePassword(false);
}
项目:touchtestweb-android
文件:PrivacyPolicyActivity.java
@Override
@SuppressLint("SetJavaScriptEnabled")
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_privacy_policy);
final WebView privacyPolicyWebView = (WebView)findViewById(R.id.privacypolicy);
privacyPolicyWebView.setVisibility(View.VISIBLE);
privacyPolicyWebView.getSettings().setJavaScriptEnabled(true);
privacyPolicyWebView.getSettings().setRenderPriority(RenderPriority.HIGH);
privacyPolicyWebView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
privacyPolicyWebView.setWebViewClient(new WebViewClient() { });
privacyPolicyWebView.resumeTimers();
privacyPolicyWebView.loadUrl("http://www.soasta.com/privacy-policy");
}
项目:BookmarkHelper
文件:CustomWebView.java
private void initSettings() {
// 初始化设置
WebSettings mSettings = this.getSettings();
mSettings.setJavaScriptEnabled(true);//开启javascript
mSettings.setDomStorageEnabled(true);//开启DOM
mSettings.setDisplayZoomControls(false);//关闭页面的放大缩小按钮
mSettings.setDefaultTextEncodingName("utf-8");//设置字符编码
//设置web页面
mSettings.setAllowFileAccess(true);//设置支持文件流
mSettings.setSupportZoom(true);// 支持缩放
mSettings.setBuiltInZoomControls(true);// 支持缩放
mSettings.setUseWideViewPort(true);// 调整到适合webview大小
mSettings.setLoadWithOverviewMode(true);// 调整到适合webview大小
mSettings.setDefaultZoom(ZoomDensity.FAR);// 屏幕自适应网页,如果没有这个,在低分辨率的手机上显示可能会异常
mSettings.setRenderPriority(RenderPriority.HIGH);
//提高网页加载速度,暂时阻塞图片加载,然后网页加载好了,在进行加载图片
mSettings.setBlockNetworkImage(true);
mSettings.setAppCacheEnabled(true);//开启缓存机制
setWebViewClient(new MyWebViewClient());
setOnLongClickListener(this);
}
项目:BioStar2Android
文件:Html5WebView.java
@SuppressLint("SetJavaScriptEnabled")
@SuppressWarnings("deprecation")
public void WebViewSetting(boolean transparent) {
getSettings().setLoadWithOverviewMode(true);
getSettings().setUseWideViewPort(true);
getSettings().setSupportZoom(true);
getSettings().setBuiltInZoomControls(false);
getSettings().setJavaScriptEnabled(true);
getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND);
setInitialScale(1);
setHorizontalScrollBarEnabled(false);
setVerticalScrollBarEnabled(false);
setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
setScrollbarFadingEnabled(true);
setHorizontalScrollbarOverlay(true);
setVerticalScrollbarOverlay(true);
setFocusable(true);
setFocusableInTouchMode(true);
getSettings().setRenderPriority(RenderPriority.HIGH);
getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
getSettings().setAppCacheEnabled(false);
getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
getSettings().setDomStorageEnabled(true);
if (transparent)
setBackgroundColor(0);
}
项目:FrontOne
文件:ShopActivity.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shop);
initView();
WebSettings webSettings = webView.getSettings();
webView.getSettings().setRenderPriority(RenderPriority.HIGH);
// 设置WebView属性,能够执行Javascript脚本
webSettings.setJavaScriptEnabled(true);
// 设置可以访问文件
webSettings.setAllowFileAccess(true);
// 设置支持缩放
webSettings.setBuiltInZoomControls(true);
// 加载需要显示的网页
webView.loadUrl("http://www.taobao.com");
// 设置Web视图
webView.setWebViewClient(new webViewClient());
}
项目:Cricket-Score
文件:ScoreBoardActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_score_board);
wView = (WebView)findViewById(R.id.webView1);
wView.loadUrl(AppConstant.STARTUP_LINK);
wView.setBackgroundColor(getResources().getColor(android.R.color.background_light));
wView.getSettings().setJavaScriptEnabled(true);
wView.getSettings().setBuiltInZoomControls(true);
wView.getSettings().setAllowFileAccess(true);
wView.requestFocus(View.FOCUS_DOWN);
wView.getSettings().setDatabaseEnabled(true);
wView.getSettings().setDomStorageEnabled(true);
wView.getSettings().setRenderPriority(RenderPriority.HIGH);
wView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
wView.setWebViewClient(new SSLTolerentWebViewClient());
}
项目:letv
文件:TDialog.java
@SuppressLint({"SetJavaScriptEnabled"})
private void b() {
this.i.setVerticalScrollBarEnabled(false);
this.i.setHorizontalScrollBarEnabled(false);
this.i.setWebViewClient(new FbWebViewClient());
this.i.setWebChromeClient(this.mChromeClient);
this.i.clearFormData();
WebSettings settings = this.i.getSettings();
settings.setSavePassword(false);
settings.setSaveFormData(false);
settings.setCacheMode(-1);
settings.setNeedInitialFocus(false);
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
settings.setRenderPriority(RenderPriority.HIGH);
settings.setJavaScriptEnabled(true);
if (!(this.c == null || this.c.get() == null)) {
settings.setDatabaseEnabled(true);
settings.setDatabasePath(((Context) this.c.get()).getApplicationContext().getDir("databases", 0).getPath());
}
settings.setDomStorageEnabled(true);
this.jsBridge.a(new JsListener(), "sdk_js_if");
this.i.loadUrl(this.e);
this.i.setLayoutParams(a);
this.i.setVisibility(4);
this.i.getSettings().setSavePassword(false);
}
项目:letv
文件:H5AuthActivity.java
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
try {
String string = extras.getString("url");
if (k.a(string)) {
Method method;
super.requestWindowFeature(1);
this.c = new Handler(getMainLooper());
View linearLayout = new LinearLayout(getApplicationContext());
LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
linearLayout.setOrientation(1);
setContentView(linearLayout, layoutParams);
this.a = new WebView(getApplicationContext());
layoutParams.weight = 1.0f;
this.a.setVisibility(0);
linearLayout.addView(this.a, layoutParams);
WebSettings settings = this.a.getSettings();
settings.setUserAgentString(settings.getUserAgentString() + k.c(getApplicationContext()));
settings.setRenderPriority(RenderPriority.HIGH);
settings.setSupportMultipleWindows(true);
settings.setJavaScriptEnabled(true);
settings.setSavePassword(false);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setMinimumFontSize(settings.getMinimumFontSize() + 8);
settings.setAllowFileAccess(false);
settings.setTextSize(TextSize.NORMAL);
this.a.setVerticalScrollbarOverlay(true);
this.a.setWebViewClient(new a());
this.a.setDownloadListener(new a(this));
this.a.loadUrl(string);
if (VERSION.SDK_INT >= 7) {
try {
method = this.a.getSettings().getClass().getMethod("setDomStorageEnabled", new Class[]{Boolean.TYPE});
if (method != null) {
method.invoke(this.a.getSettings(), new Object[]{Boolean.valueOf(true)});
}
} catch (Exception e) {
}
}
try {
method = this.a.getClass().getMethod("removeJavascriptInterface", new Class[0]);
if (method != null) {
method.invoke(this.a, new Object[]{"searchBoxJavaBridge_"});
return;
}
return;
} catch (Exception e2) {
return;
}
}
finish();
} catch (Exception e3) {
finish();
}
} catch (Exception e4) {
finish();
}
}
项目:letv
文件:H5PayActivity.java
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
try {
String string = extras.getString("url");
if (k.a(string)) {
Method method;
super.requestWindowFeature(1);
this.c = new Handler(getMainLooper());
Object string2 = extras.getString("cookie");
if (!TextUtils.isEmpty(string2)) {
CookieSyncManager.createInstance(getApplicationContext()).sync();
CookieManager.getInstance().setCookie(string, string2);
CookieSyncManager.getInstance().sync();
}
View linearLayout = new LinearLayout(getApplicationContext());
LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
linearLayout.setOrientation(1);
setContentView(linearLayout, layoutParams);
this.a = new WebView(getApplicationContext());
layoutParams.weight = 1.0f;
this.a.setVisibility(0);
linearLayout.addView(this.a, layoutParams);
WebSettings settings = this.a.getSettings();
settings.setUserAgentString(settings.getUserAgentString() + k.c(getApplicationContext()));
settings.setRenderPriority(RenderPriority.HIGH);
settings.setSupportMultipleWindows(true);
settings.setJavaScriptEnabled(true);
settings.setSavePassword(false);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setMinimumFontSize(settings.getMinimumFontSize() + 8);
settings.setAllowFileAccess(false);
settings.setTextSize(TextSize.NORMAL);
this.a.setVerticalScrollbarOverlay(true);
this.a.setWebViewClient(new a());
this.a.loadUrl(string);
if (VERSION.SDK_INT >= 7) {
try {
method = this.a.getSettings().getClass().getMethod("setDomStorageEnabled", new Class[]{Boolean.TYPE});
if (method != null) {
method.invoke(this.a.getSettings(), new Object[]{Boolean.valueOf(true)});
}
} catch (Exception e) {
}
}
try {
method = this.a.getClass().getMethod("removeJavascriptInterface", new Class[0]);
if (method != null) {
method.invoke(this.a, new Object[]{"searchBoxJavaBridge_"});
return;
}
return;
} catch (Exception e2) {
return;
}
}
finish();
} catch (Exception e3) {
finish();
}
} catch (Exception e4) {
finish();
}
}
项目:letv
文件:AuthActivity.java
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
try {
this.d = extras.getString(b);
String string = extras.getString("params");
if (k.a(string)) {
Method method;
super.requestWindowFeature(1);
this.f = new Handler(getMainLooper());
View linearLayout = new LinearLayout(getApplicationContext());
LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
linearLayout.setOrientation(1);
setContentView(linearLayout, layoutParams);
this.c = new WebView(getApplicationContext());
layoutParams.weight = 1.0f;
this.c.setVisibility(0);
linearLayout.addView(this.c, layoutParams);
WebSettings settings = this.c.getSettings();
settings.setUserAgentString(settings.getUserAgentString() + k.c(getApplicationContext()));
settings.setRenderPriority(RenderPriority.HIGH);
settings.setSupportMultipleWindows(true);
settings.setJavaScriptEnabled(true);
settings.setSavePassword(false);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setMinimumFontSize(settings.getMinimumFontSize() + 8);
settings.setAllowFileAccess(false);
settings.setTextSize(TextSize.NORMAL);
this.c.setVerticalScrollbarOverlay(true);
this.c.setWebViewClient(new b());
this.c.setWebChromeClient(new a());
this.c.setDownloadListener(new a(this));
this.c.loadUrl(string);
if (VERSION.SDK_INT >= 7) {
try {
method = this.c.getSettings().getClass().getMethod("setDomStorageEnabled", new Class[]{Boolean.TYPE});
if (method != null) {
method.invoke(this.c.getSettings(), new Object[]{Boolean.valueOf(true)});
}
} catch (Exception e) {
}
}
try {
method = this.c.getClass().getMethod("removeJavascriptInterface", new Class[0]);
if (method != null) {
method.invoke(this.c, new Object[]{"searchBoxJavaBridge_"});
return;
}
return;
} catch (Exception e2) {
return;
}
}
finish();
} catch (Exception e3) {
finish();
}
} catch (Exception e4) {
finish();
}
}
项目:boohee_v5.6
文件:PKDialog.java
@SuppressLint({"SetJavaScriptEnabled"})
private void initViews() {
this.mWebView.setVerticalScrollBarEnabled(false);
this.mWebView.setHorizontalScrollBarEnabled(false);
this.mWebView.setWebViewClient(new FbWebViewClient());
this.mWebView.setWebChromeClient(this.mChromeClient);
this.mWebView.clearFormData();
WebSettings settings = this.mWebView.getSettings();
settings.setSavePassword(false);
settings.setSaveFormData(false);
settings.setCacheMode(-1);
settings.setNeedInitialFocus(false);
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
settings.setRenderPriority(RenderPriority.HIGH);
settings.setJavaScriptEnabled(true);
if (!(this.mWeakContext == null || this.mWeakContext.get() == null)) {
settings.setDatabaseEnabled(true);
settings.setDatabasePath(((Context) this.mWeakContext.get()).getApplicationContext()
.getDir("databases", 0).getPath());
}
settings.setDomStorageEnabled(true);
this.jsBridge.a(new JsListener(), "sdk_js_if");
this.mWebView.clearView();
this.mWebView.loadUrl(this.mUrl);
this.mWebView.getSettings().setSavePassword(false);
}
项目:boohee_v5.6
文件:TDialog.java
@SuppressLint({"SetJavaScriptEnabled"})
private void b() {
this.i.setVerticalScrollBarEnabled(false);
this.i.setHorizontalScrollBarEnabled(false);
this.i.setWebViewClient(new FbWebViewClient());
this.i.setWebChromeClient(this.mChromeClient);
this.i.clearFormData();
WebSettings settings = this.i.getSettings();
settings.setSavePassword(false);
settings.setSaveFormData(false);
settings.setCacheMode(-1);
settings.setNeedInitialFocus(false);
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
settings.setRenderPriority(RenderPriority.HIGH);
settings.setJavaScriptEnabled(true);
if (!(this.c == null || this.c.get() == null)) {
settings.setDatabaseEnabled(true);
settings.setDatabasePath(((Context) this.c.get()).getApplicationContext().getDir
("databases", 0).getPath());
}
settings.setDomStorageEnabled(true);
this.jsBridge.a(new JsListener(), "sdk_js_if");
this.i.loadUrl(this.e);
this.i.setLayoutParams(a);
this.i.setVisibility(4);
this.i.getSettings().setSavePassword(false);
}
项目:boohee_v5.6
文件:H5AuthActivity.java
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
try {
String string = extras.getString("url");
if (i.b(string)) {
Method method;
super.requestWindowFeature(1);
this.c = new Handler(getMainLooper());
View linearLayout = new LinearLayout(getApplicationContext());
LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
linearLayout.setOrientation(1);
setContentView(linearLayout, layoutParams);
this.a = new WebView(getApplicationContext());
layoutParams.weight = 1.0f;
this.a.setVisibility(0);
linearLayout.addView(this.a, layoutParams);
WebSettings settings = this.a.getSettings();
settings.setUserAgentString(settings.getUserAgentString() + i.c(getApplicationContext()));
settings.setRenderPriority(RenderPriority.HIGH);
settings.setSupportMultipleWindows(true);
settings.setJavaScriptEnabled(true);
settings.setSavePassword(false);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setMinimumFontSize(settings.getMinimumFontSize() + 8);
settings.setAllowFileAccess(false);
settings.setTextSize(TextSize.NORMAL);
this.a.setVerticalScrollbarOverlay(true);
this.a.setWebViewClient(new a());
this.a.setDownloadListener(new b(this));
this.a.loadUrl(string);
if (VERSION.SDK_INT >= 7) {
try {
method = this.a.getSettings().getClass().getMethod("setDomStorageEnabled", new Class[]{Boolean.TYPE});
if (method != null) {
method.invoke(this.a.getSettings(), new Object[]{Boolean.valueOf(true)});
}
} catch (Exception e) {
}
}
try {
method = this.a.getClass().getMethod("removeJavascriptInterface", new Class[0]);
if (method != null) {
method.invoke(this.a, new Object[]{"searchBoxJavaBridge_"});
method.invoke(this.a, new Object[]{"accessibility"});
method.invoke(this.a, new Object[]{"accessibilityTraversal"});
return;
}
return;
} catch (Exception e2) {
return;
}
}
finish();
} catch (Exception e3) {
finish();
}
} catch (Exception e4) {
finish();
}
}
项目:boohee_v5.6
文件:H5PayActivity.java
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
try {
String string = extras.getString("url");
if (i.b(string)) {
Method method;
super.requestWindowFeature(1);
this.c = new Handler(getMainLooper());
Object string2 = extras.getString("cookie");
if (!TextUtils.isEmpty(string2)) {
CookieSyncManager.createInstance(getApplicationContext()).sync();
CookieManager.getInstance().setCookie(string, string2);
CookieSyncManager.getInstance().sync();
}
View linearLayout = new LinearLayout(getApplicationContext());
LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
linearLayout.setOrientation(1);
setContentView(linearLayout, layoutParams);
this.a = new WebView(getApplicationContext());
layoutParams.weight = 1.0f;
this.a.setVisibility(0);
linearLayout.addView(this.a, layoutParams);
WebSettings settings = this.a.getSettings();
settings.setUserAgentString(settings.getUserAgentString() + i.c(getApplicationContext()));
settings.setRenderPriority(RenderPriority.HIGH);
settings.setSupportMultipleWindows(true);
settings.setJavaScriptEnabled(true);
settings.setSavePassword(false);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setMinimumFontSize(settings.getMinimumFontSize() + 8);
settings.setAllowFileAccess(false);
settings.setTextSize(TextSize.NORMAL);
this.a.setVerticalScrollbarOverlay(true);
this.a.setWebViewClient(new a());
this.a.loadUrl(string);
if (VERSION.SDK_INT >= 7) {
try {
method = this.a.getSettings().getClass().getMethod("setDomStorageEnabled", new Class[]{Boolean.TYPE});
if (method != null) {
method.invoke(this.a.getSettings(), new Object[]{Boolean.valueOf(true)});
}
} catch (Exception e) {
}
}
try {
method = this.a.getClass().getMethod("removeJavascriptInterface", new Class[0]);
if (method != null) {
method.invoke(this.a, new Object[]{"searchBoxJavaBridge_"});
method.invoke(this.a, new Object[]{"accessibility"});
method.invoke(this.a, new Object[]{"accessibilityTraversal"});
return;
}
return;
} catch (Exception e2) {
return;
}
}
finish();
} catch (Exception e3) {
finish();
}
} catch (Exception e4) {
finish();
}
}
项目:boohee_v5.6
文件:AuthActivity.java
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
try {
this.d = extras.getString(b);
String string = extras.getString("params");
if (i.b(string)) {
Method method;
super.requestWindowFeature(1);
this.f = new Handler(getMainLooper());
View linearLayout = new LinearLayout(getApplicationContext());
LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
linearLayout.setOrientation(1);
setContentView(linearLayout, layoutParams);
this.c = new WebView(getApplicationContext());
layoutParams.weight = 1.0f;
this.c.setVisibility(0);
linearLayout.addView(this.c, layoutParams);
WebSettings settings = this.c.getSettings();
settings.setUserAgentString(settings.getUserAgentString() + i.c(getApplicationContext()));
settings.setRenderPriority(RenderPriority.HIGH);
settings.setSupportMultipleWindows(true);
settings.setJavaScriptEnabled(true);
settings.setSavePassword(false);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setMinimumFontSize(settings.getMinimumFontSize() + 8);
settings.setAllowFileAccess(false);
settings.setTextSize(TextSize.NORMAL);
this.c.setVerticalScrollbarOverlay(true);
this.c.setWebViewClient(new b());
this.c.setWebChromeClient(new a());
this.c.setDownloadListener(new a(this));
this.c.loadUrl(string);
if (VERSION.SDK_INT >= 7) {
try {
method = this.c.getSettings().getClass().getMethod("setDomStorageEnabled", new Class[]{Boolean.TYPE});
if (method != null) {
method.invoke(this.c.getSettings(), new Object[]{Boolean.valueOf(true)});
}
} catch (Exception e) {
}
}
try {
method = this.c.getClass().getMethod("removeJavascriptInterface", new Class[0]);
if (method != null) {
method.invoke(this.c, new Object[]{"searchBoxJavaBridge_"});
method.invoke(this.c, new Object[]{"accessibility"});
method.invoke(this.c, new Object[]{"accessibilityTraversal"});
return;
}
return;
} catch (Exception e2) {
return;
}
}
finish();
} catch (Exception e3) {
finish();
}
} catch (Exception e4) {
finish();
}
}
项目:extend-enhance-base
文件:AbstractEnhancedWebView.java
@SuppressWarnings("deprecation")
public void setHighRenderPriority() {
try {
webSettings.setRenderPriority(RenderPriority.HIGH);
} catch (Exception e) {
e.printStackTrace();
}
}
项目:FMTech
文件:NewsstandArticleRenderer.java
private NewsstandArticleRenderer(Context paramContext, byte paramByte)
{
super(paramContext, null, 0);
setWebChromeClient(new WebChromeClient());
setWebViewClient(new NewsstandWebViewClient((byte)0));
WebSettings localWebSettings = getSettings();
localWebSettings.setAllowFileAccess(false);
localWebSettings.setAppCacheEnabled(false);
localWebSettings.setCacheMode(2);
localWebSettings.setDatabaseEnabled(false);
localWebSettings.setDomStorageEnabled(true);
localWebSettings.setJavaScriptEnabled(true);
localWebSettings.setPluginState(WebSettings.PluginState.OFF);
localWebSettings.setSupportZoom(true);
localWebSettings.setUseWideViewPort(true);
localWebSettings.setLoadWithOverviewMode(false);
localWebSettings.setUserAgentString(localWebSettings.getUserAgentString() + " OnyxArticleView/1.0");
if (!sDidSetRenderPriority)
{
sDidSetRenderPriority = true;
localWebSettings.setRenderPriority(WebSettings.RenderPriority.HIGH);
}
setOnLongClickListener(new View.OnLongClickListener()
{
public final boolean onLongClick(View paramAnonymousView)
{
return true;
}
});
}
项目:Travis-Jr
文件:BuildInfoActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
runUITask(UI_SYNC);
logs = new TreeMap<String, StringBuilder>();
ownerName = getIntent().getStringExtra(EXTRA_OWNER_NAME);
repoName = getIntent().getStringExtra(EXTRA_REPO_NAME);
buildId = getIntent().getLongExtra(EXTRA_BUILD_ID, 0);
slug.setText(ownerName + "/" + repoName);
WebSettings settings = log.getSettings();
settings.setDefaultZoom(WebSettings.ZoomDensity.FAR);
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
settings.setUseWideViewPort(true);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setRenderPriority(RenderPriority.HIGH);
settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
loadLogData(ASCII_ART.toString());
}
项目:Roid-Library
文件:RLWebBrowser.java
private void init(Context context) {
this.context = context;
View rootView = LayoutInflater.from(context).inflate(R.layout.web_browser, null);
this.addView(rootView);
layout_loading = (LinearLayout) rootView.findViewById(R.id.layout_loading);
layout_loading.setVisibility(View.GONE);
iv_refresh = (ImageView) rootView.findViewById(R.id.iv_refresh);
iv_refresh.setOnClickListener(myClickListener);
iv_stop = (ImageView) rootView.findViewById(R.id.iv_stop);
iv_stop.setOnClickListener(myClickListener);
iv_goback = (ImageView) rootView.findViewById(R.id.iv_goback);
iv_goback.setOnClickListener(myClickListener);
iv_more = (ImageView) rootView.findViewById(R.id.iv_more);
iv_more.setOnClickListener(myClickListener);
iv_goback.setEnabled(false);
iv_goforward = (ImageView) rootView.findViewById(R.id.iv_goforward);
iv_goforward.setOnClickListener(myClickListener);
iv_goforward.setEnabled(false);
webView = (WebView) rootView.findViewById(R.id.webView);
webView.getSettings().setSupportZoom(true);
webView.getSettings().setSaveFormData(false);
webView.getSettings().setSavePassword(false);
webView.getSettings().setPluginState(PluginState.ON);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setBlockNetworkLoads(false);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setRenderPriority(RenderPriority.HIGH);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webView.setWebChromeClient(myWebChromeClient);
webView.setWebViewClient(myWebViewClient);
webView.setOnTouchListener(myTouchListener);
webView.setDownloadListener(myDownLoadListener);
}
项目:android-webview-example
文件:StartActivity.java
private void createView(final String url) {
this.webView = (WebView) findViewById(R.id.webview);
this.webView.setAlwaysDrawnWithCacheEnabled(true);
this.webView.setAnimationCacheEnabled(true);
this.webView.setFocusableInTouchMode(true);
this.webView.setDrawingCacheEnabled(true);
this.webView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_LOW);
this.webView.setDrawingCacheEnabled(true);
this.webView.setKeepScreenOn(true);
this.webView.setWebViewClient(new WebViewClient());
final WebSettings webSettings = webView.getSettings();
webSettings.setSavePassword(false);
webSettings.setSaveFormData(false);
webSettings.setJavaScriptEnabled(true);
webSettings.setSupportZoom(false);
webSettings.setCacheMode( WebSettings.LOAD_NO_CACHE );
webSettings.setPluginsEnabled( false );
webSettings.setSupportMultipleWindows(false);
webSettings.setRenderPriority( RenderPriority.HIGH );
webSettings.setUseWideViewPort(true);
final WebChromeClient chromeClient = new com.significantfiles.mrcounter.WebChromeClient(
this);
webView.setWebChromeClient(chromeClient);
initJavaScriptInterfaces();
webView.setAlwaysDrawnWithCacheEnabled(false);
webView.loadUrl(url);
}
项目:q-mail
文件:MessageWebView.java
/**
* Configure a {@link WebView} to display a Message. This method takes into account a user's
* preferences when configuring the view. This message is used to view a message and to display a message being
* replied to.
*/
public void configure() {
this.setVerticalScrollBarEnabled(true);
this.setVerticalScrollbarOverlay(true);
this.setScrollBarStyle(SCROLLBARS_INSIDE_OVERLAY);
this.setLongClickable(true);
if (QMail.getK9MessageViewTheme() == Theme.DARK) {
// Black theme should get a black webview background
// we'll set the background of the messages on load
this.setBackgroundColor(0xff000000);
}
final WebSettings webSettings = this.getSettings();
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
/* TODO this might improve rendering smoothness when webview is animated into view
if (VERSION.SDK_INT >= VERSION_CODES.M) {
webSettings.setOffscreenPreRaster(true);
}
*/
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setUseWideViewPort(true);
if (QMail.autofitWidth()) {
webSettings.setLoadWithOverviewMode(true);
}
disableDisplayZoomControls();
webSettings.setJavaScriptEnabled(false);
webSettings.setLoadsImagesAutomatically(true);
webSettings.setRenderPriority(RenderPriority.HIGH);
// TODO: Review alternatives. NARROW_COLUMNS is deprecated on KITKAT
webSettings.setLayoutAlgorithm(LayoutAlgorithm.NARROW_COLUMNS);
setOverScrollMode(OVER_SCROLL_NEVER);
webSettings.setTextZoom(QMail.getFontSizes().getMessageViewContentAsPercent());
// Disable network images by default. This is overridden by preferences.
blockNetworkData(true);
}
项目:GitHub
文件:HTML5CustomWebView.java
private void init(Context context) {
mContext = context;
mLayout = new FrameLayout(context);
mBrowserFrameLayout = (FrameLayout) LayoutInflater.from(context)
.inflate(R.layout.common_custom_screen, null);
wv_imgbtn_back = (LinearLayout) mBrowserFrameLayout.findViewById(R.id.top_bar_linear_back);
wv_tv_title = (TextView) mBrowserFrameLayout.findViewById(R.id.top_bar_title);
mContentView = (FrameLayout) mBrowserFrameLayout
.findViewById(R.id.main_content);
mCustomViewContainer = (FrameLayout) mBrowserFrameLayout
.findViewById(R.id.fullscreen_custom_content);
frame_progress = (FrameLayout) mBrowserFrameLayout
.findViewById(R.id.frame_progress);
webview_tv_progress = (TextView) frame_progress
.findViewById(R.id.webview_tv_progress);
final FrameLayout.LayoutParams COVER_SCREEN_PARAMS = new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER);
mLayout.addView(mBrowserFrameLayout, COVER_SCREEN_PARAMS);
mWebChromeClient = new MyWebChromeClient();
setWebChromeClient(mWebChromeClient);
setWebViewClient(new MyWebViewClient());
WebSettings webSettings = this.getSettings();
webSettings.setJavaScriptEnabled(true); //开启javascript
webSettings.setDomStorageEnabled(true); //开启DOM
webSettings.setDefaultTextEncodingName("utf-8"); //设置编码
// // web页面处理
webSettings.setAllowFileAccess(true);// 支持文件流
// webSettings.setSupportZoom(true);// 支持缩放
// webSettings.setBuiltInZoomControls(true);// 支持缩放
webSettings.setUseWideViewPort(true);// 调整到适合webview大小
webSettings.setLoadWithOverviewMode(true);// 调整到适合webview大小
webSettings.setDefaultZoom(ZoomDensity.FAR);// 屏幕自适应网页,如果没有这个,在低分辨率的手机上显示可能会异常
webSettings.setRenderPriority(RenderPriority.HIGH);
//提高网页加载速度,暂时阻塞图片加载,然后网页加载好了,在进行加载图片
webSettings.setBlockNetworkImage(true);
//开启缓存机制
webSettings.setAppCacheEnabled(true);
//根据当前网页连接状态
if(StrUtils.getAPNType(context)== StrUtils.WIFI){
//设置无缓存
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
}else{
//设置缓存
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
}
mContentView.addView(this);
// 返回
wv_imgbtn_back.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
closeAdWebPage();
}
});
}
项目:touchtestweb-android
文件:MainActivity.java
@SuppressWarnings("deprecation")
@SuppressLint("SetJavaScriptEnabled")
private WebView initializeAUTWebView()
{
// Intialize AUT WebView and set properties
final WebView webView = getAUTWebView();
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
// Clear all cookies on TTW launch
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
webView.getSettings().setSaveFormData(false);
webView.setFocusable(true);
webView.setFocusableInTouchMode(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setBuiltInZoomControls(true);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2)
{
webView.getSettings().setRenderPriority(RenderPriority.HIGH);
webView.getSettings().setSavePassword(false);
}
// Setup WebViewClient and Progress Bar
webView.setWebViewClient(new SimpleWebViewClient(this));
webView.setWebChromeClient(new SimpleWebChromeClient(this, webView));
// Retrieved the TTW user-agent from the shared preference file
SharedPreferences pref = getSharedPreferences(MainSettingsActivity.BASE_CLASS_NAME, Context.MODE_PRIVATE);
String userAgent = pref.getString(MainSettingsActivity.USER_AGENT_KEY, "");
if (!userAgent.isEmpty())
{
// The user has defined the user-agent
webView.getSettings().setUserAgentString(userAgent);
}
else
{
// Use the default user agent
webView.getSettings().setUserAgentString(s_userAgentDefault);
}
return webView;
}
项目:touchtestweb-android
文件:MainActivity.java
@SuppressWarnings("deprecation")
@SuppressLint("SetJavaScriptEnabled")
private WebView initializeAUTWebView()
{
// Intialize AUT WebView and set properties
final WebView webView = getAUTWebView();
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
// Clear all cookies on TTW launch
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
webView.getSettings().setSaveFormData(false);
webView.setFocusable(true);
webView.setFocusableInTouchMode(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setBuiltInZoomControls(true);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2)
{
webView.getSettings().setRenderPriority(RenderPriority.HIGH);
webView.getSettings().setSavePassword(false);
}
// Setup WebViewClient and Progress Bar
webView.setWebViewClient(new SimpleWebViewClient(this));
webView.setWebChromeClient(new SimpleWebChromeClient(this, webView));
// Retrieved the TTW user-agent from the shared preference file
SharedPreferences pref = getSharedPreferences(MainSettingsActivity.BASE_CLASS_NAME, Context.MODE_PRIVATE);
String userAgent = pref.getString(MainSettingsActivity.USER_AGENT_KEY, "");
if (!userAgent.isEmpty())
{
// The user has defined the user-agent
webView.getSettings().setUserAgentString(userAgent);
}
else
{
// Use the default user agent
webView.getSettings().setUserAgentString(s_userAgentDefault);
}
return webView;
}
项目:K9-MailClient
文件:MessageWebView.java
/**
* Configure a {@link WebView} to display a Message. This method takes into account a user's
* preferences when configuring the view. This message is used to view a message and to display a message being
* replied to.
*/
public void configure() {
this.setVerticalScrollBarEnabled(true);
this.setVerticalScrollbarOverlay(true);
this.setScrollBarStyle(SCROLLBARS_INSIDE_OVERLAY);
this.setLongClickable(true);
if (K9.getK9MessageViewTheme() == Theme.DARK) {
// Black theme should get a black webview background
// we'll set the background of the messages on load
this.setBackgroundColor(0xff9e9e9e);
}
final WebSettings webSettings = this.getSettings();
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
/* TODO this might improve rendering smoothness when webview is animated into view
if (VERSION.SDK_INT >= VERSION_CODES.M) {
webSettings.setOffscreenPreRaster(true);
}
*/
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setUseWideViewPort(true);
if (K9.autofitWidth()) {
webSettings.setLoadWithOverviewMode(true);
}
disableDisplayZoomControls();
webSettings.setJavaScriptEnabled(false);
webSettings.setLoadsImagesAutomatically(true);
webSettings.setRenderPriority(RenderPriority.HIGH);
// TODO: Review alternatives. NARROW_COLUMNS is deprecated on KITKAT
webSettings.setLayoutAlgorithm(LayoutAlgorithm.NARROW_COLUMNS);
setOverScrollMode(OVER_SCROLL_NEVER);
webSettings.setTextZoom(K9.getFontSizes().getMessageViewContentAsPercent());
// Disable network images by default. This is overridden by preferences.
blockNetworkData(true);
}
项目:Android_Skin_3.x
文件:WebInitCompat.java
@SuppressLint("SetJavaScriptEnabled")
@Override
public void setDefaultSetting(WebView view) {
WebSettingsCompat settings = WebSettingsCompat.get(view);
// JavaScript 支持
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true); // 允许 JavaScript 弹出窗口
// web 图片
settings.setLoadsImagesAutomatically(true);
// WebView 去除缩放功能但隐藏缩放控件
settings.setSupportZoom(false);
settings.setBuiltInZoomControls(false);
settings.setDisplayZoomControls(false);
// 自适应屏幕
settings.setUseWideViewPort(true);
// 加载模式
settings.setLoadWithOverviewMode(true);
// 保持表单和密码
settings.setSaveFormData(false);
settings.setSavePassword(false);
// 线程优先级调整
settings.setRenderPriority(RenderPriority.HIGH);
// 用WebView显示图片,可使用这个参数
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
settings.setSupportMultipleWindows(true);
// LOAD_CACHE_ONLY: 不使用网络,只读取本地缓存数据
// LOAD_DEFAULT: 根据cache-control决定是否从网络上取数据
// LOAD_CACHE_NORMAL: API level 17中已经废弃, 从API level
// 11开始作用同LOAD_DEFAULT模式
// LOAD_NO_CACHE: 不使用缓存,只从网络获取数据
// LOAD_CACHE_ELSE_NETWORK: 只要本地有,无论是否过期、或者no-cache,都使用缓存中的数据
// www.taobao.com的cache-control为no-cache,在模式LOAD_DEFAULT下,无论如何都会从网络上取数据,如果没有网络,就会出现错误页面;
// 在LOAD_CACHE_ELSE_NETWORK模式下,无论是否有网络,只要本地有缓存,都使用缓存。本地没有缓存时才从网络上获取
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
// 开启 DOM storage API 功能
settings.setDomStorageEnabled(true);
// 开启 database storage API 功能
settings.setDatabaseEnabled(true);
// 开启 Application Caches 功能
settings.setAppCacheEnabled(true);
// 设置最大缓存值 8M
settings.setAppCacheMaxSize(8 * 1024 * 1024);
settings.setPluginState(PluginStateCompat.ON_DEMAND);
// 可以读取内容缓存
settings.setAllowContentAccess(true);
// 可以读取文件缓存(manifest生效)
settings.setAllowFileAccess(true);
settings.setAllowFileAccessFromFileURLs(true);
settings.setAllowUniversalAccessFromFileURLs(true);
}
项目:Android_Skin_3.x
文件:WebSettingsCompat.java
@Override
public void setRenderPriority(WebSettings settings, RenderPriority priority) {
settings.setRenderPriority(priority);
}
项目:Android_Skin_3.x
文件:WebSettingsCompat.java
public void setRenderPriority(RenderPriority priority) {
impl.setRenderPriority(settings, priority);
}
项目:Android_Skin_2.0
文件:WebInitCompat.java
@SuppressLint("SetJavaScriptEnabled")
@Override
public void setDefaultSetting(WebView view) {
WebSettingsCompat settings = WebSettingsCompat.get(view);
// JavaScript 支持
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true); // 允许 JavaScript 弹出窗口
// web 图片
settings.setLoadsImagesAutomatically(true);
// WebView 去除缩放功能但隐藏缩放控件
settings.setSupportZoom(false);
settings.setBuiltInZoomControls(false);
settings.setDisplayZoomControls(false);
// 自适应屏幕
settings.setUseWideViewPort(true);
// 加载模式
settings.setLoadWithOverviewMode(true);
// 保持表单和密码
settings.setSaveFormData(false);
settings.setSavePassword(false);
// 线程优先级调整
settings.setRenderPriority(RenderPriority.HIGH);
// 用WebView显示图片,可使用这个参数
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
settings.setSupportMultipleWindows(true);
// LOAD_CACHE_ONLY: 不使用网络,只读取本地缓存数据
// LOAD_DEFAULT: 根据cache-control决定是否从网络上取数据
// LOAD_CACHE_NORMAL: API level 17中已经废弃, 从API level
// 11开始作用同LOAD_DEFAULT模式
// LOAD_NO_CACHE: 不使用缓存,只从网络获取数据
// LOAD_CACHE_ELSE_NETWORK: 只要本地有,无论是否过期、或者no-cache,都使用缓存中的数据
// www.taobao.com的cache-control为no-cache,在模式LOAD_DEFAULT下,无论如何都会从网络上取数据,如果没有网络,就会出现错误页面;
// 在LOAD_CACHE_ELSE_NETWORK模式下,无论是否有网络,只要本地有缓存,都使用缓存。本地没有缓存时才从网络上获取
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
// 开启 DOM storage API 功能
settings.setDomStorageEnabled(true);
// 开启 database storage API 功能
settings.setDatabaseEnabled(true);
// 开启 Application Caches 功能
settings.setAppCacheEnabled(true);
// 设置最大缓存值 8M
settings.setAppCacheMaxSize(8 * 1024 * 1024);
settings.setPluginState(PluginStateCompat.ON_DEMAND);
// 可以读取内容缓存
settings.setAllowContentAccess(true);
// 可以读取文件缓存(manifest生效)
settings.setAllowFileAccess(true);
settings.setAllowFileAccessFromFileURLs(true);
settings.setAllowUniversalAccessFromFileURLs(true);
}
项目:Android_Skin_2.0
文件:WebSettingsCompat.java
@Override
public void setRenderPriority(WebSettings settings, RenderPriority priority) {
settings.setRenderPriority(priority);
}
项目:Android_Skin_2.0
文件:WebSettingsCompat.java
public void setRenderPriority(RenderPriority priority) {
impl.setRenderPriority(settings, priority);
}
项目:Hybrid-SDK-Android
文件:LocalWebView.java
private void init() {
setWebViewClient(_webViewClient);
setWebChromeClient(_webChromeClient);
enablePlatformNotifications();
getSettings().setJavaScriptEnabled(true);
//for performance
getSettings().setRenderPriority(RenderPriority.HIGH);
if(Build.VERSION.SDK_INT >= 11)
{
try {
Method methodOfsetLayerType = WebView.class.getMethod("setLayerType", int.class, Paint.class);
if(methodOfsetLayerType != null) {
//LAYER_TYPE_SOFTWARE
methodOfsetLayerType.invoke(this, 1, null);
SSLog.d("LocalWebView", "setLayerType to LAYER_TYPE_SOFTWARE");
}
} catch (Exception e) {
}
}
//getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
getSettings().setAllowFileAccess(true);
getSettings().setBuiltInZoomControls(false);
getSettings().setDefaultTextEncodingName(DefaultEncoding);
getSettings().setSaveFormData(false);
getSettings().setSavePassword(false);
getSettings().setSupportZoom(false);
//getSettings().setDomStorageEnabled(true);
getSettings().setBlockNetworkImage(false);
getSettings().setBlockNetworkLoads(false);
setLongClickable(false);
setScrollBarStyle(SCROLLBARS_OUTSIDE_OVERLAY);
setFocusable(true);
requestFocus();
}
项目:appcan-android
文件:EBrowserSetting.java
public void initBaseSetting(boolean webApp) {
mWebApp = webApp;
mWebSetting.setSaveFormData(false);
mWebSetting.setSavePassword(false);
mWebSetting.setLightTouchEnabled(false);
mWebSetting.setJavaScriptEnabled(true);
mWebSetting.setNeedInitialFocus(false);
mWebSetting.setSupportMultipleWindows(false);
mWebSetting.setGeolocationEnabled(true);
// mWebSetting.setNavDump(false);
//mWebSetting.setPluginsEnabled(true);
mWebSetting.setJavaScriptCanOpenWindowsAutomatically(false);
mWebSetting.setUseWideViewPort(false);
mWebSetting.setLoadsImagesAutomatically(true);
mWebSetting.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
mWebSetting.setUserAgentString(USERAGENT_NEW);
mWebSetting.setRenderPriority(RenderPriority.HIGH);
mWebSetting.setDefaultTextEncodingName("UTF-8");
if (Build.VERSION.SDK_INT <= 7) {
invokeHtml5(mWebSetting);
}
if (Build.VERSION.SDK_INT >= 14) {
mWebSetting.setTextZoom(100);;
}
if (webApp) {
mWebSetting.setUseWideViewPort(true);
// mWebSetting.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
return;
}
// mWebSetting.setCacheMode(WebSettings.LOAD_NO_CACHE);
// disables the actual onscreen controls from showing up
mWebSetting.setBuiltInZoomControls(false);
// disables the ability to zoom
mWebSetting.setSupportZoom(false);
mWebSetting.setDefaultFontSize(ESystemInfo.getIntence().mDefaultFontSize);
mWebSetting.setDefaultFixedFontSize(ESystemInfo.getIntence().mDefaultFontSize);
// float sca = mBrwView.getScale();
// if (sca != 1.0f) {
if (Build.VERSION.SDK_INT <= 18) {
mWebSetting.setDefaultZoom(ESystemInfo.getIntence().mDefaultzoom.getValue());
}
// }
}
项目:Android_Skin_3.x
文件:WebSettingsCompat.java
/**
* 线程优先级调整
*/
public void setRenderPriority(WebSettings settings, RenderPriority priority);
项目:Android_Skin_2.0
文件:WebSettingsCompat.java
/**
* 线程优先级调整
*/
public void setRenderPriority(WebSettings settings, RenderPriority priority);
项目:cordova-android-chromium
文件:ChromiumSettings.java
/**
* Sets the priority of the Render thread. Unlike the other settings, this
* one only needs to be called once per process. The default value is
* {@link RenderPriority#NORMAL}.
*
* @param priority the priority
*/
public abstract void setRenderPriority(RenderPriority priority);