Skip to content

Commit

Permalink
修改bug
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxikang committed Aug 29, 2016
1 parent a559cd5 commit 6a47023
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public void onScrollBottom() {
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (scrollWebView.isShown()) {
recyclerView.scrollToPosition(0);
scrollWebView.scrollTo(0, 0);
}


// recyclerView.smoothScrollToPosition(20);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
mDispatchWebView.setOnCustomScroolChangeListener(new ScrollWebView.ScrollInterface() {
@Override
public void onSChanged(int l, int t, int oldl, int oldt) {
Log.d("调用滑动事件",l+" "+t+" "+oldl+" "+oldt);
float webViewContentHeight = mDispatchWebView.getContentHeight() * mDispatchWebView.getScale();
Log.d("内容高度",webViewContentHeight+"");
float webViewCurrentHeight = (mDispatchWebView.getHeight() + mDispatchWebView.getScrollY());
Expand All @@ -87,6 +88,12 @@ public void onSChanged(int l, int t, int oldl, int oldt) {
isIntercept = false;
}

}else {
System.out.println("WebView滑动到了不是底端");
if (isScrollUp && mDispatchWebView.isScroll()) {
mDispatchWebView.ignoreTouchCancel(true);
isIntercept = true;
}
}
}
});
Expand Down

0 comments on commit 6a47023

Please sign in to comment.