mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Add a way to stash/unstash transient taskbar.
- Adds threshold to show taskbar during swipe - Introduces FLAG_STASHED_IN_APP_AUTO flag - Adds logic for taskbar to auto hide based on time and touch Bug: 252905206 Test: manual Change-Id: I070cd619487fdd4498a988ae5aadce6dd14313f7
This commit is contained in:
@@ -380,13 +380,23 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
mControllerCallbacks.onInterceptTouchEvent(ev);
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (!mTouchEnabled) {
|
||||
return true;
|
||||
}
|
||||
if (mIconLayoutBounds.left <= event.getX() && event.getX() <= mIconLayoutBounds.right) {
|
||||
// Don't allow long pressing between icons, or above/below them.
|
||||
if (mIconLayoutBounds.left <= event.getX()
|
||||
&& event.getX() <= mIconLayoutBounds.right
|
||||
&& !DisplayController.isTransientTaskbar(mActivityContext)) {
|
||||
// Don't allow long pressing between icons, or above/below them
|
||||
// unless its transient taskbar.
|
||||
mControllerCallbacks.clearTouchInProgress();
|
||||
return true;
|
||||
}
|
||||
if (mControllerCallbacks.onTouchEvent(event)) {
|
||||
@@ -403,6 +413,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
|
||||
public void setTouchesEnabled(boolean touchEnabled) {
|
||||
this.mTouchEnabled = touchEnabled;
|
||||
mControllerCallbacks.clearTouchInProgress();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user