OSDN Git Service

LinearLayout guide fixes
authorTor Norbye <tnorbye@google.com>
Fri, 12 Nov 2010 00:07:21 +0000 (16:07 -0800)
committerTor Norbye <tnorbye@google.com>
Fri, 12 Nov 2010 00:07:21 +0000 (16:07 -0800)
commit48eb12393a8bafb52d314fea053ac0cdfa200946
treed28b597b8526ffe238d520297c53009cd1a74959
parent544f82284a7832b8f76f191b23a89c5ab12dba4c
LinearLayout guide fixes

When we have bounds for the dragged items, we show a preview rectangle
where the item will appear after the drop. We show this rectangle
midway between the two siblings that share the insert
position. However, when you are inserting *after* the last item in the
LinearLayout, there is no reason to show the item midway, since at
this point nothing below the insert position needs to be shifted
down. This checkin changes this such that for the last insert
position, we show the rectangle fully below the insert line (or to the
right of it in case of a horizontal layout).

This changeset also fixes a bug where the last (available, not active)
dropzone would not be shown on a palette drag.

Change-Id: If449b43582e072c9e0ad6d7741afbe8e845e8df9
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LinearLayoutRule.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/LinearLayoutRuleTest.java