OSDN Git Service

Improve handling for GestureOverlayView
authorTor Norbye <tnorbye@google.com>
Mon, 7 Feb 2011 02:25:29 +0000 (18:25 -0800)
committerTor Norbye <tnorbye@google.com>
Mon, 7 Feb 2011 02:57:02 +0000 (18:57 -0800)
commit3cf5ce58a324efb926b862b16ad8b18d033f5be9
tree3c2357ca86fa9c91a5900aded3fe017adfaa6b10
parent7444edd3b15a977ae86bfed38c89f5cc19de71c4
Improve handling for GestureOverlayView

The layout editor has special handling for the "root" element, which
for example suppresses hover-highlighting for the root and a click
will initiate a marquee selection rather than a drag.

Some layouts wrap the layout inside a GestoreOverlayView. This does
not work well since the "real" root is its child, which will not be
treated as a proper root.

This changeset fixes this situation by handling this scenario such
that both the gesture overlay and its child is treated as the root.

Also make fix such that the icon in the outline also works for the
gesture overlay.

Change-Id: Ia96d2bc402958b44f9f82646ff0fc4552ab0cf14
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/descriptors/ElementDescriptor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/CustomViewDescriptorService.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasViewInfo.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/SelectionItem.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/RulesEngine.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasViewInfoTest.java