mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Clean up work profile
This includes - Dismiss work edu on launcher state change - Remove work tab flash on first setup - Make edu bottom sheet adopt theme color - Fix Work toggle bottom inset Bug: 149200572 Bug: 149197172 Bug: 149199058 Bug: 149215103 Bug: 149198955 Bug: 145595763 Bug:149481723 Test: Manual Change-Id: I39a30782b80fd3a66bede55754fa30a940d2caee
This commit is contained in:
@@ -103,6 +103,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
|
||||
private final MultiValueAlpha mMultiValueAlpha;
|
||||
|
||||
Rect mInsets = new Rect();
|
||||
|
||||
public AllAppsContainerView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
@@ -320,6 +322,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
|
||||
@Override
|
||||
public void setInsets(Rect insets) {
|
||||
mInsets.set(insets);
|
||||
DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
int leftRightPadding = grid.desiredWorkspaceLeftRightMarginPx
|
||||
+ grid.cellLayoutPaddingLeftRightPx;
|
||||
@@ -411,6 +414,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
this.addView(mWorkFooterContainer);
|
||||
mWorkFooterContainer.setInsets(mInsets);
|
||||
mWorkFooterContainer.post(() -> mAH[AdapterHolder.WORK].applyPadding());
|
||||
}
|
||||
|
||||
@@ -548,17 +552,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
return mHeader != null && mHeader.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
public void onScrollUpEnd() {
|
||||
highlightWorkTabIfNecessary();
|
||||
}
|
||||
|
||||
void highlightWorkTabIfNecessary() {
|
||||
if (mUsingTabs) {
|
||||
((PersonalWorkSlidingTabStrip) findViewById(R.id.tabs))
|
||||
.highlightWorkTabIfNecessary();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an update listener to {@param animator} that adds springs to the animation.
|
||||
*/
|
||||
@@ -643,9 +636,9 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
R.layout.work_apps_paused, null);
|
||||
recyclerView.post(() -> {
|
||||
int width = recyclerView.getWidth();
|
||||
int height = recyclerView.getHeight();
|
||||
pausedOverlay.measure(makeMeasureSpec(width, EXACTLY),
|
||||
makeMeasureSpec(height, EXACTLY));
|
||||
int height = recyclerView.getHeight() - mWorkFooterContainer.getHeight();
|
||||
pausedOverlay.measure(makeMeasureSpec(recyclerView.getWidth(), EXACTLY),
|
||||
makeMeasureSpec(recyclerView.getHeight(), EXACTLY));
|
||||
pausedOverlay.layout(0, 0, width, height);
|
||||
applyPadding();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user