google-code-export / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
1 stars 0 forks source link

Tablet/Touch device support #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description of the new feature:
The gwt-cal should work on touch devices like android tablet browser and ipad 
browser. 

Use Case:

Assumptions:
1.
2.
3.

Exceptions:
1.
2.
3.

Code / psuedo-code:

Original issue reported on code.google.com by kandarp....@gmail.com on 9 Jun 2012 at 11:14

GoogleCodeExporter commented 9 years ago
Likewise. In particular, drag and drop does not work in the day view. Drag and 
drop works fine in the Month view, which is not scrolled; it does not work at 
all in the day view.

The touch-scrolling support in GWT ScrollPanel does not appear to be the issue, 
as disabling that has no effect.

Original comment by grmcdor...@gmail.com on 8 Jan 2013 at 4:29

GoogleCodeExporter commented 9 years ago
I may have identified the cause.

gwt-dnd requires a drag handle to implement HasTouchStartHandlers in order to 
handle touch-based dragging. In the day view, the drag handles are Div objects, 
which do not implement that.

Conversely, in the month view the drag items are FocusPanels (or more 
precisely, AppointmentWidget, derived from FocusPanel), which implement 
HasAllTouchHandlers.

As a result, drag and drop works in the Month view but not in the Day view.

Original comment by grmcdor...@gmail.com on 8 Jan 2013 at 4:49

GoogleCodeExporter commented 9 years ago
I'll see if there is some way to modify the DayView to support touch devices.

Any help is welcome ;)

Original comment by ctasada on 8 Jan 2013 at 10:04

GoogleCodeExporter commented 9 years ago
If I get the time, I'll checkout the source and give it a whirl. It should be 
sufficient to add HasAllTouchHandlers to the Div class, from the looks of the 
code.

I have access to a variety of Android devices and iPads (running both iOS 5 and 
6) if you need help testing.

Original comment by grmcdor...@gmail.com on 8 Jan 2013 at 10:09

GoogleCodeExporter commented 9 years ago
Confirmed. All that you need to do is to add HasAllTouchHandlers to the 
embedded Div class in AppointmentWidget (and the appropriate method 
implementations). When this is done, appointments drag nicely on the Day view.

Tested on iOS 5, iPad 3; Android 4.1 (Jelly Bean)/Samsung Galaxy Tab 2.

Scrolling does seem to get a little confused on the latter; may need to test 
some more in that environment.

A suggested patch is attached.

Original comment by grmcdor...@gmail.com on 10 Jan 2013 at 4:34

Attachments:

GoogleCodeExporter commented 9 years ago
Done in r443

Everything seems to work fine, except for the Drag&Drop creation. I don't find 
any workaround for it, since it would affect the scrolling support.

Original comment by ctasada on 12 Feb 2013 at 10:12