First pass of the Launcher Overlay interface / impl

-> Added simple reference launcher extension
-> Make launcher able to handle a null qsb

Change-Id: Ib1575243cac800a335e95bbf00cdc394bb4741c3
This commit is contained in:
Adam Cohen
2014-10-16 09:49:24 -07:00
parent 1aa3abea27
commit c2d6e897db
13 changed files with 693 additions and 39 deletions

View File

@@ -89,6 +89,8 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
private Drawable mLeftHoverDrawableActive;
private Drawable mRightHoverDrawableActive;
private boolean mBlockTouches = false;
/**
* Used to create a new DragLayer from XML.
*
@@ -185,11 +187,19 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
return false;
}
public void setBlockTouch(boolean block) {
mBlockTouches = block;
}
private boolean handleTouchDown(MotionEvent ev, boolean intercept) {
Rect hitRect = new Rect();
int x = (int) ev.getX();
int y = (int) ev.getY();
if (mBlockTouches) {
return true;
}
for (AppWidgetResizeFrame child: mResizeFrames) {
child.getHitRect(hitRect);
if (hitRect.contains(x, y)) {
@@ -332,6 +342,10 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
int x = (int) ev.getX();
int y = (int) ev.getY();
if (mBlockTouches) {
return true;
}
if (action == MotionEvent.ACTION_DOWN) {
if (handleTouchDown(ev, false)) {
return true;