mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Add work toggle to work apps paused message
This also fixes scrolling issues in landscape Bug: 186857875 Bug: 161929312 Bug: 189983516 Bug: 190567199 screenshot: https://screenshot.googleplex.com/BCjcyJFqJo6W4Tr Test: local Change-Id: I7bcf23cc4be2fca936eba41342731789eb8f3292
This commit is contained in:
@@ -23,7 +23,6 @@ import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_QUIET_MODE_
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
@@ -494,15 +493,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
View overlay = mAH[AdapterHolder.WORK].getOverlayView();
|
||||
int v = newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE ? GONE : VISIBLE;
|
||||
overlay.findViewById(R.id.work_apps_paused_title).setVisibility(v);
|
||||
overlay.findViewById(R.id.work_apps_paused_content).setVisibility(v);
|
||||
}
|
||||
|
||||
private void replaceRVContainer(boolean showTabs) {
|
||||
for (int i = 0; i < mAH.length; i++) {
|
||||
if (mAH[i].recyclerView != null) {
|
||||
@@ -544,9 +534,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
&& mAllAppsStore.hasModelFlag(
|
||||
FLAG_HAS_SHORTCUT_PERMISSION | FLAG_QUIET_MODE_CHANGE_PERMISSION));
|
||||
}
|
||||
if (mSearchUiManager != null && mSearchUiManager.getEditText() != null) {
|
||||
mSearchUiManager.getEditText().hideKeyboard();
|
||||
}
|
||||
}
|
||||
|
||||
// Used by tests only
|
||||
@@ -704,7 +691,9 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
mHeaderPaint.setColor(mHeaderColor);
|
||||
mHeaderPaint.setAlpha((int) (getAlpha() * Color.alpha(mHeaderColor)));
|
||||
if (mHeaderPaint.getColor() != mScrimColor && mHeaderPaint.getColor() != 0) {
|
||||
canvas.drawRect(0, 0, getWidth(), mSearchContainer.getTop() + getTranslationY(),
|
||||
int bottom = mUsingTabs && mHeader.mHeaderCollapsed ? mHeader.getVisibleBottomBound()
|
||||
: mSearchContainer.getBottom();
|
||||
canvas.drawRect(0, 0, getWidth(), bottom + getTranslationY(),
|
||||
mHeaderPaint);
|
||||
}
|
||||
}
|
||||
@@ -781,13 +770,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
mAH[AdapterHolder.MAIN].recyclerView.setVerticalFadingEdgeEnabled(!mUsingTabs
|
||||
&& verticalFadingEdge);
|
||||
}
|
||||
|
||||
private View getOverlayView() {
|
||||
if (mOverlay == null) {
|
||||
mOverlay = mLauncher.getLayoutInflater().inflate(R.layout.work_apps_paused, null);
|
||||
}
|
||||
return mOverlay;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user