Clean up warnings and some private API usage

Change-Id: Ic3c0b333942bc3de130e41531017e71358bd5bfb
This commit is contained in:
Michael Jurka
2012-05-21 20:36:44 -07:00
parent 3abc8ed439
commit 9bc8eba333
16 changed files with 29 additions and 90 deletions

View File

@@ -18,12 +18,9 @@ package com.android.launcher2;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Insets;
import android.util.AttributeSet;
import android.widget.ImageView;
class PagedViewWidgetImageView extends ImageView {
public boolean mAllowRequestLayout = true;
@@ -39,16 +36,11 @@ class PagedViewWidgetImageView extends ImageView {
@Override
protected void onDraw(Canvas canvas) {
Insets insets = Insets.NONE;
if (getBackground() != null) {
insets = getBackground().getLayoutInsets();
}
canvas.save();
canvas.clipRect(getScrollX() + getPaddingLeft() + insets.left,
getScrollY() + getPaddingTop() + insets.top,
getScrollX() + getRight() - getLeft() - getPaddingRight() - insets.right,
getScrollY() + getBottom() - getTop() - getPaddingBottom() - insets.bottom);
canvas.clipRect(getScrollX() + getPaddingLeft(),
getScrollY() + getPaddingTop(),
getScrollX() + getRight() - getLeft() - getPaddingRight(),
getScrollY() + getBottom() - getTop() - getPaddingBottom());
super.onDraw(canvas);
canvas.restore();