mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Clean up warnings and some private API usage
Change-Id: Ic3c0b333942bc3de130e41531017e71358bd5bfb
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user