Scroll webview horizontally inside a ViewPager

前端 未结 2 1988
温柔的废话
温柔的废话 2020-11-27 11:40

I\'ve put a WebView loading an image inside a ViewPager. When I try to scroll the image horizontally I move over to the next view instead of scrolling the image.

Is

2条回答
  •  一向
    一向 (楼主)
    2020-11-27 12:07

    Although Sven mentioned for layout file I want to add detail. After you extend Webview and ViewPager classes,

    Inside your activity you will cast to your extended class like this:

    web = (MyWebView) findViewById(R.id.webview);
    

    Inside your layout file like this:

    
    

提交回复
热议问题