Gibson
Gibson

Reputation: 810

Android WebView: How do I horizontally scroll between different pages?

I have several HTML pages that I'd like to be able to scroll horizontally, kind of like how you would read a book or a magazine. But instead of a totally smooth scrolling horizontally, I would like each page to kind of click into place as I scroll.

What is the best way I can go about doing this?

Upvotes: 1

Views: 484

Answers (1)

Jens
Jens

Reputation: 6383

Maybe use a ViewFlipper with multipe WebViews and add animations when you flipp through your views.

Also you would have to add a GestureDetector and implement the onFling() method.

Depending on how many webpages you have you might want to limit the amount of WebView instances and resuse them and just load another page when they are shown.

Upvotes: 3

Related Questions