aboutsummaryrefslogtreecommitdiffstats
path: root/layoutlib_api/src/com/android/layoutlib/api/ViewInfo.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2010-11-15 15:04:31 -0800
committerTor Norbye <tnorbye@google.com>2010-11-15 15:04:31 -0800
commitb8235512174daabfc899ff71b5ffd9241556d305 (patch)
tree116a5d1c97ad97c1f1b4cab14f228e7b936fee63 /layoutlib_api/src/com/android/layoutlib/api/ViewInfo.java
parent62ff1e577398b526c11f1c626ef959d03ae9d0aa (diff)
downloadsdk-b8235512174daabfc899ff71b5ffd9241556d305.zip
sdk-b8235512174daabfc899ff71b5ffd9241556d305.tar.gz
sdk-b8235512174daabfc899ff71b5ffd9241556d305.tar.bz2
Improvements to LinearLayout feedback
When you have a small and empty linear layout, and you drag something larger (such as a button) into it, the drop feedback is a bit confusing: The drop feedback rectangle is larger than the linear layout, so the bounds are outside the layout. This changeset addresses this by forcing the bounds of the drop preview to be at most the dimensions of the LinearLayout itself. Second, the fix I applied last week to show the last insert position, did not work in all cases - in particular when the drag originates outside the canvas itself. To determine if we are inserting at the last position, look at the number of target node children, rather than the number of potential insert positions, since in some cases the number of insert positions will be smaller than the number of children. Finally, there was a theoretical bug that if one of the dragged elements did not non-zero bounds, then the insert position would be wrong. This is also fixed by this changeset. Change-Id: Ia30e99f7a3aa45b8091855b69aaef86ec3699405
Diffstat (limited to 'layoutlib_api/src/com/android/layoutlib/api/ViewInfo.java')
0 files changed, 0 insertions, 0 deletions