Initial changes for handling touch events.

When the touch passes a threashold, we take a snapshot and start the launcher
activity. The launcher displays the snapshot on top of its UI.
As we get further touch events, we move this snapshot and the hotseat in reponse.

Change-Id: I4623676227000afd52805a414a4de499081feced
This commit is contained in:
Sunny Goyal
2017-11-10 14:52:00 -08:00
parent 3a052d413d
commit f8088eecf1
9 changed files with 620 additions and 10 deletions

View File

@@ -20,7 +20,6 @@ import android.annotation.SuppressLint;
import android.content.Context;
import android.support.annotation.IntDef;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
@@ -42,7 +41,8 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
TYPE_ACTION_POPUP,
TYPE_WIDGETS_BOTTOM_SHEET,
TYPE_WIDGET_RESIZE_FRAME,
TYPE_WIDGETS_FULL_SHEET
TYPE_WIDGETS_FULL_SHEET,
TYPE_QUICKSTEP_PREVIEW
})
@Retention(RetentionPolicy.SOURCE)
public @interface FloatingViewType {}
@@ -51,9 +51,11 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
public static final int TYPE_WIDGETS_BOTTOM_SHEET = 1 << 2;
public static final int TYPE_WIDGET_RESIZE_FRAME = 1 << 3;
public static final int TYPE_WIDGETS_FULL_SHEET = 1 << 4;
public static final int TYPE_QUICKSTEP_PREVIEW = 1 << 5;
public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP
| TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET;
| TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET
| TYPE_QUICKSTEP_PREVIEW;
protected boolean mIsOpen;