mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Clean up work profile" into ub-launcher3-master
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);
|
||||
}
|
||||
@@ -325,6 +327,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;
|
||||
@@ -416,6 +419,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());
|
||||
}
|
||||
|
||||
@@ -553,17 +557,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.
|
||||
*/
|
||||
@@ -648,9 +641,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