Merge "Resource cleanup: Removing obsolete resources" into ub-launcher3-burnaby
|
Before Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 153 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 637 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 129 B |
|
Before Width: | Height: | Size: 889 B |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 897 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 50 KiB |
@@ -24,6 +24,7 @@ import android.animation.ValueAnimator.AnimatorUpdateListener;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
@@ -46,6 +47,10 @@ import java.util.ArrayList;
|
|||||||
* A ViewGroup that coordinates dragging across its descendants
|
* A ViewGroup that coordinates dragging across its descendants
|
||||||
*/
|
*/
|
||||||
public class DragLayer extends InsettableFrameLayout {
|
public class DragLayer extends InsettableFrameLayout {
|
||||||
|
|
||||||
|
// Scrim color without any alpha component.
|
||||||
|
private static final int SCRIM_COLOR = Color.BLACK & 0x00FFFFFF;
|
||||||
|
|
||||||
@Thunk DragController mDragController;
|
@Thunk DragController mDragController;
|
||||||
private int[] mTmpXY = new int[2];
|
private int[] mTmpXY = new int[2];
|
||||||
|
|
||||||
@@ -78,7 +83,6 @@ public class DragLayer extends InsettableFrameLayout {
|
|||||||
private int mChildCountOnLastUpdate = -1;
|
private int mChildCountOnLastUpdate = -1;
|
||||||
|
|
||||||
// Darkening scrim
|
// Darkening scrim
|
||||||
private Drawable mBackground;
|
|
||||||
private float mBackgroundAlpha = 0;
|
private float mBackgroundAlpha = 0;
|
||||||
|
|
||||||
// Related to adjacent page hints
|
// Related to adjacent page hints
|
||||||
@@ -109,7 +113,6 @@ public class DragLayer extends InsettableFrameLayout {
|
|||||||
mRightHoverDrawable = res.getDrawable(R.drawable.page_hover_right);
|
mRightHoverDrawable = res.getDrawable(R.drawable.page_hover_right);
|
||||||
mLeftHoverDrawableActive = res.getDrawable(R.drawable.page_hover_left_active);
|
mLeftHoverDrawableActive = res.getDrawable(R.drawable.page_hover_left_active);
|
||||||
mRightHoverDrawableActive = res.getDrawable(R.drawable.page_hover_right_active);
|
mRightHoverDrawableActive = res.getDrawable(R.drawable.page_hover_right_active);
|
||||||
mBackground = res.getDrawable(R.drawable.apps_customize_bg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setup(Launcher launcher, DragController controller) {
|
public void setup(Launcher launcher, DragController controller) {
|
||||||
@@ -926,12 +929,10 @@ public class DragLayer extends InsettableFrameLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dispatchDraw(Canvas canvas) {
|
protected void dispatchDraw(Canvas canvas) {
|
||||||
// Draw the background gradient below children.
|
// Draw the background below children.
|
||||||
if (mBackground != null && mBackgroundAlpha > 0.0f) {
|
if (mBackgroundAlpha > 0.0f) {
|
||||||
int alpha = (int) (mBackgroundAlpha * 255);
|
int alpha = (int) (mBackgroundAlpha * 255);
|
||||||
mBackground.setAlpha(alpha);
|
canvas.drawColor((alpha << 24) | SCRIM_COLOR);
|
||||||
mBackground.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
|
|
||||||
mBackground.draw(canvas);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.dispatchDraw(canvas);
|
super.dispatchDraw(canvas);
|
||||||
|
|||||||