本文整理了Java中android.webkit.WebView.getVisibility()
方法的一些代码示例,展示了WebView.getVisibility()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.getVisibility()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:getVisibility
暂无
代码示例来源:origin: ankidroid/Anki-Android
private void setInterface() {
if (mCurrentCard == null) {
return;
}
if (mCard == null) {
mCard = createWebView();
// On your desktop use chrome://inspect to connect to emulator WebViews
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT &&
AnkiDroidApp.getSharedPrefs(this).getBoolean("html_javascript_debugging", false)) {
WebView.setWebContentsDebuggingEnabled(true);
}
mCardFrame.addView(mCard);
}
if (mCard.getVisibility() != View.VISIBLE) {
mCard.setVisibility(View.VISIBLE);
}
}
代码示例来源:origin: matrix-org/matrix-android-sdk
/**
* @return the callView visibility
*/
@Override
public int getVisibility() {
if (null != mWebView) {
return mWebView.getVisibility();
} else {
return View.GONE;
}
}
代码示例来源:origin: grzegorznittner/chanu
private boolean shouldExpandImage() {
/*
if (viewHolder.list_item_image_expanded != null
&& viewHolder.list_item_image_expanded.getVisibility() != View.GONE
&& viewHolder.list_item_image_expanded.getHeight() > 0) {
if (DEBUG) Log.i(TAG, "Image already expanded, skipping");
return false;
}
else
*/
if (viewHolder.list_item_image_expanded_webview != null
&& viewHolder.list_item_image_expanded_webview.getVisibility() != View.GONE
&& viewHolder.list_item_image_expanded_webview.getHeight() > 0) {
if (DEBUG) Log.i(TAG, "Image webview already expanded, skipping");
return false;
}
else {
return true;
}
}
代码示例来源:origin: GeoODK/collect
public boolean suppressFlingGesture(MotionEvent e1, MotionEvent e2,
float velocityX, float velocityY) {
if (mImageDisplay == null
|| mImageDisplay.getVisibility() != View.VISIBLE) {
return false;
}
Rect rect = new Rect();
mImageDisplay.getHitRect(rect);
// Log.i(t, "hitRect: " + rect.left + "," + rect.top + " : " +
// rect.right + "," + rect.bottom );
// Log.i(t, "e1 Raw, Clean: " + e1.getRawX() + "," + e1.getRawY() +
// " : " + e1.getX() + "," + e1.getY());
// Log.i(t, "e2 Raw, Clean: " + e2.getRawX() + "," + e2.getRawY() +
// " : " + e2.getX() + "," + e2.getY());
// starts in WebView
if (rect.contains((int) e1.getRawX(), (int) e1.getRawY())) {
return true;
}
// ends in WebView
if (rect.contains((int) e2.getRawX(), (int) e2.getRawY())) {
return true;
}
// transits WebView
if (rect.contains((int) ((e1.getRawX() + e2.getRawX()) / 2.0),
(int) ((e1.getRawY() + e2.getRawY()) / 2.0))) {
return true;
}
// Log.i(t, "NOT SUPPRESSED");
return false;
}
代码示例来源:origin: grzegorznittner/chanu
private static boolean toggleExpandedWebViewHeader(
ThreadViewHolder viewHolder) {
toggleExpandedWebViewItem(viewHolder);
viewHolder.list_item_image_expanded_click_effect
.setVisibility(View.GONE);
boolean wasHidden = true;
if (viewHolder.list_item_image_expanded_webview.getVisibility() == View.VISIBLE) {
ViewGroup.LayoutParams params = viewHolder.list_item_image_header
.getLayoutParams();
if (params != null) {
Point imageSize = new Point(params.width, params.height);
sizeView(viewHolder.list_item_image_header, imageSize);
ThreadImageExpander.setImageDimensions(viewHolder, imageSize);
if (DEBUG)
Log.i(TAG, "sizedHeader " + params.width + "x"
+ params.height);
}
wasHidden = false;
}
viewHolder.list_item_image_header.setVisibility(View.VISIBLE);
return wasHidden;
}
代码示例来源:origin: powerpoint45/Lucid-Browser
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
if (activityRef.get()!=null && activityRef.get().webLayout!=null) {
CustomWebView WV = activityRef.get().webLayout
.findViewById(R.id.browser_page);
if (WV != null && CustomWebView.this == WV) {
if (PB == null)
try {
PB = activityRef.get().webLayout
.findViewById(R.id.webpgbar);
} catch (Exception e) {
}
if (view.getVisibility() == View.VISIBLE)
if (PB != null && PB.getVisibility() != View.VISIBLE
&& url.compareTo("about:blank") != 0)
PB.setVisibility(ProgressBar.VISIBLE);
ImageButton IB = activityRef.get().barHolder.findViewById(R.id.browser_refresh);
if (IB != null) {
IB.setImageResource(R.drawable.btn_toolbar_stop_loading_normal);
}
setUrlBarText(url);
//force colorize toolbar
activityRef.get().toolbar.requestLayout();
}
}
}
代码示例来源:origin: stackoverflow.com
if (webView1.getVisibility() == View.GONE)
webView1.loadUrl(url);
else
代码示例来源:origin: stackoverflow.com
if(mwebview.getVisibility()==View.VISIBLE)
代码示例来源:origin: stackoverflow.com
public void onClick(View arg0) {
if (webview.getVisibility() == View.VISIBLE) {
webview.setVisibility(View.GONE);
textView.setVisibility(View.VISIBLE);
代码示例来源:origin: stackoverflow.com
if(mwebview.getVisibility()==View.VISIBLE)
代码示例来源:origin: stackoverflow.com
if (webView != null && webView.getVisibility() == View.VISIBLE && webView.canGoBack())
代码示例来源:origin: grzegorznittner/chanu
&& (
viewHolder.list_item_image_expanded_webview.getVisibility() == View.VISIBLE
内容来源于网络,如有侵权,请联系作者删除!