Fixing some issues/regressions related to scaled icons.

- Fixes issue with folder icons being clipped in landscape in sw720dp (Bug: 6118397)
- Fixes issue with divider being in wrong orientation in sw720dp
- Fixes issue with scaled icons not being drawn with filtering
- Fixes issue with side pages showing under the hotseat when in landscape in phone UI
- Animates the drag view on pick up and drop

Change-Id: Iad26427ec63fcbc9bdb3b29a4645689ba445d5c8
This commit is contained in:
Winson Chung
2012-03-02 17:14:58 -08:00
parent 633f1aad55
commit eecf02da58
15 changed files with 89 additions and 62 deletions

View File

@@ -580,7 +580,14 @@ public abstract class PagedView extends ViewGroup {
// Calculate the variable page spacing if necessary
if (mPageSpacing < 0) {
setPageSpacing(((right - left) - getChildAt(0).getMeasuredWidth()) / 2);
// The gap between pages in the PagedView should be equal to the gap from the page
// to the edge of the screen (so it is not visible in the current screen). To
// account for unequal padding on each side of the paged view, we take the maximum
// of the left/right gap and use that as the gap between each page.
int offset = getRelativeChildOffset(0);
int spacing = Math.max(offset, (right - left) - offset -
getChildAt(0).getMeasuredWidth());
setPageSpacing(spacing);
}
}