android.webkit.WebView.getScrollY()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(288)

本文整理了Java中android.webkit.WebView.getScrollY()方法的一些代码示例,展示了WebView.getScrollY()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.getScrollY()方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:getScrollY

WebView.getScrollY介绍

暂无

代码示例

代码示例来源:origin: TheFinestArtist/FinestWebView-Android

@Override
 public boolean onInterceptTouchEvent(MotionEvent event) {
  return webView.getScrollY() <= scrollBuffer && super.onInterceptTouchEvent(event);
 }
}

代码示例来源:origin: tianshaojie/AndroidFine

@Override
protected boolean isReadyForPullStart() {
  return mRefreshableView.getScrollY() == 0;
}

代码示例来源:origin: jberkel/sms-backup-plus

@Override @SuppressWarnings("deprecation")
  public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    final float position = webView.getScrollY() / (webView.getContentHeight() * webView.getScale());
    outState.putFloat(SCROLL_POSITION, position);
  }
}

代码示例来源:origin: tianshaojie/AndroidFine

@Override
protected boolean isReadyForPullEnd() {
  double exactContentHeight = Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
  return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

代码示例来源:origin: chaychan/TouTiao

public static boolean isWebViewToBottom(WebView webView) {
  return webView != null && webView.getContentHeight() * webView.getScale() == (webView.getScrollY() + webView.getMeasuredHeight());
}

代码示例来源:origin: jeasonlzy/HeaderViewPager

private boolean isWebViewTop(WebView scrollView) {
  if (scrollView != null) {
    int scrollViewY = scrollView.getScrollY();
    return scrollViewY <= 0;
  }
  return false;
}

代码示例来源:origin: w446108264/ScrollableLayout

private static boolean isWebViewTop(WebView scrollView) {
  if (scrollView != null) {
    int scrollViewY = scrollView.getScrollY();
    return scrollViewY <= 0;
  }
  return false;
}

代码示例来源:origin: com.albedinsky.android/ui-widget-layout

/**
 */
@Override
public boolean isScrolledAtStart() {
  return mScrollableView.getScrollY() == 0;
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
public boolean isScrolledAtStart() {
  return mScrollableView.getScrollY() == 0;
}

代码示例来源:origin: com.albedinsky.android/ui-widget-layout-scroll

/**
 */
@Override
public boolean isScrolledAtStart() {
  return mScrollableView.getScrollY() == 0;
}

代码示例来源:origin: Y-bao/PullRefreshView

@Override
public boolean canOverStart() {
  if (webView.getScrollY() <= 0)
    return true;
  else
    return false;
}

代码示例来源:origin: myxh/CoolShopping

@Override
protected boolean isReadyForPullStart() {
  return mRefreshableView.getScrollY() == 0;
}

代码示例来源:origin: huxq17/XRefreshView

public boolean canChildPullUp() {
  if (child instanceof AbsListView) {
    AbsListView absListView = (AbsListView) child;
    return canScrollVertically(child, 1)
        || absListView.getLastVisiblePosition() != mTotalItemCount - 1;
  } else if (child instanceof WebView) {
    WebView webview = (WebView) child;
    if (webview instanceof XWebView) {
      return !((XWebView) webview).isBottom();
    } else {
      float left = webview.getContentHeight() * webview.getScale();
      int right = webview.getHeight() + webview.getScrollY();
      return left != right;
    }
  } else if (child instanceof ScrollView) {
    ScrollView scrollView = (ScrollView) child;
    View childView = scrollView.getChildAt(0);
    if (childView != null) {
      return canScrollVertically(child, 1)
          || scrollView.getScrollY() < childView.getHeight() - scrollView.getHeight();
    }
  } else {
    return canScrollVertically(child, 1);
  }
  return true;
}

代码示例来源:origin: Wan7451/Wan_RecycleViewAdapter

@Override
protected boolean isReadyForPullEnd() {
  float exactContentHeight = (float) Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
  return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

代码示例来源:origin: Y-bao/PullRefreshView

@Override
public boolean canOverEnd() {
  if (webView.getScrollY() >= webView.getContentHeight() * webView.getScale() - webView.getMeasuredHeight())
    return true;
  else
    return false;
}

代码示例来源:origin: myxh/CoolShopping

@Override
protected boolean isReadyForPullEnd() {
  float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
  return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

代码示例来源:origin: huangfangyi/FanXin

@Override
protected boolean isReadyForPullEnd() {
  float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
  return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

代码示例来源:origin: kaku2015/WeatherAlarmClock

@Override
protected boolean isReadyForPullEnd() {
  float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
  return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

代码示例来源:origin: Uphie/ONE-Unofficial

@Override
protected boolean isReadyForPullEnd() {
  float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale());
  return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight());
}

代码示例来源:origin: Y-bao/PullRefreshView

@Override
  public void scrollAViewBy(int dp) {
    float maxScrollY = webView.getContentHeight() * webView.getScale() - webView.getMeasuredHeight();
    if (webView.getScrollY() + dp >= maxScrollY) {
      webView.scrollTo(0, (int) maxScrollY);
    } else {
      webView.scrollBy(0, dp);
    }
  }
}

相关文章

WebView类方法