本文整理了Java中android.webkit.WebView.setFocusable()
方法的一些代码示例,展示了WebView.setFocusable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.setFocusable()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:setFocusable
暂无
代码示例来源:origin: facebook/facebook-android-sdk
webView.getSettings().setSavePassword(false);
webView.getSettings().setSaveFormData(false);
webView.setFocusable(true);
webView.setFocusableInTouchMode(true);
webView.setOnTouchListener(new View.OnTouchListener() {
代码示例来源:origin: maks/MGit
private void loadFileContent() {
mFileContent.loadUrl("file:///android_asset/editor.html");
mFileContent.setFocusable(mEditMode);
}
代码示例来源:origin: maks/MGit
public void setEditMode(boolean mode) {
mEditMode = mode;
mFileContent.setFocusable(mEditMode);
mFileContent.setFocusableInTouchMode(mEditMode);
if (mEditMode) {
mFileContent.loadUrl(CodeGuesser
.wrapUrlScript("setEditable();"));
showToastMessage(R.string.msg_now_you_can_edit);
} else {
mFileContent.loadUrl(CodeGuesser.wrapUrlScript("save();"));
}
}
代码示例来源:origin: sheimi/SGit
private void loadFileContent() {
mFileContent.loadUrl("file:///android_asset/editor.html");
mFileContent.setFocusable(mEditMode);
}
代码示例来源:origin: sheimi/SGit
public void setEditMode(boolean mode) {
mEditMode = mode;
mFileContent.setFocusable(mEditMode);
mFileContent.setFocusableInTouchMode(mEditMode);
if (mEditMode) {
mFileContent.loadUrl(CodeGuesser
.wrapUrlScript("setEditable();"));
showToastMessage(R.string.msg_now_you_can_edit);
} else {
mFileContent.loadUrl(CodeGuesser.wrapUrlScript("save();"));
}
}
代码示例来源:origin: stackoverflow.com
WebView wv = new WebView(this);
wv.setFocusable(false);
代码示例来源:origin: BoBoMEe/Android-Demos
public static void basic(WebView webView) {
webView.setFocusable(true);
webView.setFocusableInTouchMode(true);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webSettings.setDefaultTextEncodingName("utf-8");
webView.requestFocusFromTouch();
}
}
代码示例来源:origin: stackoverflow.com
WebView myWebView = (WebView) findViewById(R.id.webview1);
myWebView.getSettings().setBuiltInZoomControls(false);
myWebView.setVerticalScrollBarEnabled(false);
myWebView.clearCache(true);
myWebView.setFocusable(true);
myWebView.setHorizontalScrollBarEnabled(false);
myWebView.getSettings().setPluginState(PluginState.ON);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.getSettings().setAppCacheEnabled(true);
myWebView.getSettings().setRenderPriority(RenderPriority.HIGH);
myWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
myWebView.getSettings().setAllowFileAccess(true);
myWebView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
myWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
代码示例来源:origin: andyiac/githot
webView.setFocusable(true);
webView.setFocusableInTouchMode(true);
webView.requestFocus(View.FOCUS_DOWN);
代码示例来源:origin: wutq/AndroidModuleDemo
public void initWebView() {
String url = "http://m.okhqb.com/item/description/1000334264.html?fromApp=true";
webView.setFocusable(false);
webView.loadUrl(url);
webSettings = webView.getSettings();
webSettings.setLoadWithOverviewMode(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setLoadsImagesAutomatically(true);
webSettings.setRenderPriority(WebSettings.RenderPriority.HIGH);
webSettings.setBlockNetworkImage(true);
webSettings.setUseWideViewPort(true);
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView.setWebViewClient(new GoodsDetailWebViewClient());
}
代码示例来源:origin: square1-io/rich-text-android
webView.getSettings().setSavePassword(false);
webView.getSettings().setSaveFormData(false);
webView.setFocusable(true);
webView.setFocusableInTouchMode(true);
webView.setOnTouchListener(new View.OnTouchListener() {
代码示例来源:origin: apps4av/avare
mWebView.setFocusable(true);
mWebView.setOnTouchListener(new View.OnTouchListener() {
@Override
代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE
@SuppressWarnings("static-access")
public static void handleContentTV(final WebView contentTV, final MessageArticlePageInfo row, int bgColor, int fgColor, Context context) {
final WebViewClient client = new WebViewClientEx((FragmentActivity) context);
contentTV.setBackgroundColor(0);
contentTV.setFocusableInTouchMode(false);
contentTV.setFocusable(false);
contentTV.setLongClickable(false);
WebSettings setting = contentTV.getSettings();
setting.setUserAgentString(context.getString(R.string.clientua) + BuildConfig.VERSION_CODE);
setting.setDefaultFontSize(PhoneConfiguration.getInstance()
.getWebSize());
setting.setJavaScriptEnabled(false);
contentTV.setWebViewClient(client);
contentTV.setTag(row.getLou());
contentTV.loadDataWithBaseURL(null, row.getFormated_html_data(),
"text/html", "utf-8", null);
}
代码示例来源:origin: apps4av/avare
wv.getSettings().setBuiltInZoomControls(false);
wv.setFocusable(true);
wv.setOnTouchListener(new View.OnTouchListener() {
@Override
代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE
contentTV.setBackgroundColor(0);
contentTV.setFocusableInTouchMode(false);
contentTV.setFocusable(false);
contentTV.setLongClickable(false);
boolean showImage = PhoneConfiguration.getInstance().isDownImgNoWifi()
代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE
contentTV.addJavascriptInterface(new ProxyBridge(context, toast), "ProxyBridge");
contentTV.setFocusableInTouchMode(true);
contentTV.setFocusable(true);
contentTV.setHapticFeedbackEnabled(true);
contentTV.setClickable(true);
内容来源于网络,如有侵权,请联系作者删除!