2

我想在 viewpager 中使用 webview,这是我的 webview 代码:

    String MyHtml="this is my html 1 <br />this is my html 2 <br />this is my html 3 <br />this is my html 4 <br />this is my html 5 <br />this is my html 6 <br />this is my html 7 <br />this is my html 8 <br />this is my html 9 <br />this is my html 10 <br />this is my html 11 <br />this is my html 12 <br />this is my html 13 <br />this is my html 14 <br />this is my html 15 <br />this is my html 16 <br />this is my html 17 <br />this is my html 18 <br />this is my html 19 <br />this is my html 20 <br />";

    MyWebView=(WebView)findViewById(R.id.webView1);

    MyWebView.setPadding(0, 0, 0, 0);
    MyWebView.setInitialScale(getScale());

    MyWebView.loadData(MyHtml, "text/html", "UTF-8");

    MyWebView.setOnTouchListener(new View.OnTouchListener() {

            public boolean onTouch(View v, MotionEvent event) {
              return (event.getAction() == MotionEvent.ACTION_MOVE);
            }
          });

现在我想在 webview 中获得最后一个可见行?在下一页加载下一行!

4

0 回答 0