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

@@ -18,10 +18,14 @@ package com.android.launcher2;
import android.app.WallpaperManager;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import com.android.launcher2.CellLayout.LayoutParams;
public class CellLayoutChildren extends ViewGroup {
static final String TAG = "CellLayoutChildren";
@@ -67,6 +71,22 @@ public class CellLayoutChildren extends ViewGroup {
return null;
}
@Override
protected void dispatchDraw(Canvas canvas) {
// Debug drawing for hit space
if (false) {
Paint p = new Paint();
p.setColor(0x6600FF00);
for (int i = getChildCount() - 1; i >= 0; i--) {
final View child = getChildAt(i);
final CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams();
canvas.drawRect(lp.x, lp.y, lp.x + lp.width, lp.y + lp.height, p);
}
}
super.dispatchDraw(canvas);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int count = getChildCount();