Commit Graph
5 Commits
Author SHA1 Message Date
Vadim Tryshev ea3355641e Fixing dragging with mouse.
If you click at the icon with mouse, then release without moving,
the framework won't generate DRAG_LOCATION events, and we'll assume
the the drag ended at (0,0) coordinate.

Fixing by updating coords at any event that has coordinates.

Bug: 22028725
Change-Id: I1872b479035e14aa9fece1532b05194fa86a4907
2015-08-13 10:48:08 -07:00
Vadim Tryshev ceed3b87dc Framework drag driver now sends new event type - exited window.
When drag exits Launcher window (for example, goes to Shelf) launcher doesn't get notified
and thinks the drag is still over it. For example if there is a moved shaking icon in Hotseat,
it will keep shaking.

Fixing this.

Bug: 22028725
Change-Id: Ie57572a57a324d426c9f6e57dc0bba56630e92df
2015-08-07 17:23:35 -07:00
Vadim Tryshev ca51dcd6ca Better separation between DragDriver and DragController
Now DragDriver uses DragController through DragDriver.EventListener
interface. I hope that this will make relations between 2 classes clearer,
and will help avoiding mess during future development.

Also, some small cleanups.

Bug: 22609426
Change-Id: Ibaf61804ab931743f2f913fac11bf24ebf9a36c8
2015-08-04 16:23:23 -07:00
Vadim Tryshev 9de91278a8 Enabling framework DND in N+.
Also, making the drag shadow opaque.

Bug: 22028725
Change-Id: I2aa61d3906cb9e9c33003bc6e485b9ff1980b9f4
2015-08-04 14:23:46 -07:00
Vadim Tryshev d6c8e7eeb1 Code to enable dragging to System UI shelf.
This CL doesn’t let the new code run, it’s under a compile-time flag,
and the behavior should be same as before.

The change introduces a concept of a DragDriver, which encapsulates
behavior of the existing DND (InternalDragDriver) or the framework-
driven DND (SystemDragDriver).

An instance of DragDriver gets created by DragController for the time
while a DND operation is in progress, and it takes care of translating
DND events for DragController.

Also did some cleanups, like removing meaningless fields etc.

Plans for future: keep working in Burnaby, and:
* Perhaps, better separate DragDriver from DragController
* Detect fling gesture for system DND
* Look at accessibility
* Polish animations and appearance
* Fix dragging from folders
* Support cancelling DND

Then, it will become possible to enable new dragging (based on Android
version).

Bug: 22028725
Change-Id: I41b40e9d512d83937f5b101ac8e3e8e7e807c269
2015-07-30 13:06:25 -07:00