Android WebView-Paging

时间:2013-08-17 07:30:16

标签: android android-webview

我想在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中获得最后一行? 在下一页加载下一行!

0 个答案:

没有答案