本文整理了Java中android.webkit.WebView.scrollBy()
方法的一些代码示例,展示了WebView.scrollBy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.scrollBy()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:scrollBy
暂无
代码示例来源:origin: ankidroid/Anki-Android
/** Scroll the currently shown flashcard vertically
*
* @param dy amount to be scrolled
*/
public void scrollCurrentCardBy(int dy) {
if (dy != 0 && mCard.canScrollVertically(dy)) {
mCard.scrollBy(0, dy);
}
}
代码示例来源:origin: stackoverflow.com
private Runnable mScrollDown = new Runnable()
{
public void run()
{
WebView webview = (WebView)findViewById(R.id.web_url);
webview.scrollBy(0, scrollSpeed);
mHandler.postDelayed(this, 200);
}
};
代码示例来源:origin: stackoverflow.com
private Runnable mScrollDown = new Runnable()
{
public void run()
{
WebView webview = (WebView)findViewById(R.id.web_url);
webview.scrollBy(0, scrollSpeed);
mHandler.postDelayed(this, 200);
}
};
代码示例来源:origin: stackoverflow.com
private Runnable mScrollDown = new Runnable()
{
public void run()
{
WebView webview = (WebView)findViewById(R.id.myWebView);
webview.scrollBy(0, scrollSpeed);
mHandler.postDelayed(this, 1000);
}
};
代码示例来源:origin: stackoverflow.com
private Runnable mScrollDown = new Runnable()
{
public void run()
{
WebView webview = (WebView)findViewById(R.id.web_url);
webview.scrollBy(0, scrollSpeed);
mHandler.postDelayed(this, 200);
}
};
代码示例来源:origin: stackoverflow.com
private Runnable mScrollDown = new Runnable()
{
public void run()
{
WebView webview = (WebView)findViewById(R.id.web_url);
webview.scrollBy(0, scrollSpeed);
mHandler.postDelayed(this, 200);
}
};
代码示例来源:origin: org.seleniumhq.selenium/selenium-android-driver
public void run() {
driver.getWebView().scrollBy(xOffset, yOffset);
}
});
代码示例来源:origin: stackoverflow.com
mWebView.setVerticalFadingEdgeEnabled(false);
//mWebView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);
mWebView.getSettings().setJavaScriptEnabled(true);
//webSettings.setLoadWithOverviewMode(true);
//webSettings.setUseWideViewPort(true);
webSettings = mWebView.getSettings();
//webSettings.setDefaultZoom(ZoomDensity.FAR);
mWebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
webSettings.setBuiltInZoomControls(true);
webSettings.setTextSize(TextSize.NORMAL);
mWebView.getSettings().setPluginsEnabled(true);
mWebView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
Log.v("here","here");
view.scrollBy(0, view.getContentHeight());
}
});
代码示例来源:origin: stackoverflow.com
float diffY = oldY - event.getY();
scrollView.scrollBy((int)diffX, (int)diffY);
Log.e("error",event.getEventTime()+" = "+diffY);
map.get(position).clear();
代码示例来源: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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!