GWT Scroll between pages / panels

I have a web application that I create when I need to allow the user to scroll between pages. From what I studied, you need to use MGWT (Google’s mobile web toolkit - http://code.google.com/p/mgwt/ )

Then you need to create a class that extends the Panel class and implements the MGWT "HasTouchHandlers" interface:

( http://code.google.com/p/mgwt/source/browse/mgwt/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchPanel.java?name=v1.0.0 -alpha1 )

Also, your panel must implement the GWT AnimatedLayout interface (such as LayoutPanel, DockLayoutPanel and SplitLayoutPane) so that you can move the panel after capturing a touch event.

My question is: can someone point me to a tutorial or sample code on how to do this? Or how is the layout of the GWT project in terms of the Panel? For example, if I have multiple pages in my application, do I have multiple panels? thanks - Mike

+5
source share
3 answers

I prefer that you use iScroll because it works without any problems on Android as well as iOS Browsers. The implementation will also work on third-party browsers such as Diigo or Dolphin. With this, you, I think, you can completely avoid using the mgwt API.

+1
source

You can also do this yourself by adding the TouchStartHandler, TouchMoveHandler, TouchEndHandler tools to you, as well as process events and save what happened. If you moved more than X between the beginning and the end, swipe your finger across the screen.

+1
source

All Articles