mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Merge changes I209e3ec7,If70df129 into main
* changes: Change collapse to use adapterItems instead of getting the childCount() Upon expanding, expand just enough so the header shows.
This commit is contained in:
committed by
Android (Google) Code Review
commit
a7bd5cf6ee
@@ -189,6 +189,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
private float mBottomSheetAlpha = 1f;
|
||||
private boolean mForceBottomSheetVisible;
|
||||
private int mTabsProtectionAlpha;
|
||||
private float mTotalHeaderProtectionHeight;
|
||||
@Nullable private AllAppsTransitionController mAllAppsTransitionController;
|
||||
|
||||
private PrivateSpaceHeaderViewController mPrivateSpaceHeaderViewController;
|
||||
@@ -1431,9 +1432,11 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
mTmpPath.reset();
|
||||
mTmpPath.addRoundRect(mTmpRectF, mBottomSheetCornerRadii, Direction.CW);
|
||||
canvas.drawPath(mTmpPath, mHeaderPaint);
|
||||
mTotalHeaderProtectionHeight = headerBottomWithScaleOnTablet;
|
||||
}
|
||||
} else {
|
||||
canvas.drawRect(0, 0, canvas.getWidth(), headerBottomWithScaleOnPhone, mHeaderPaint);
|
||||
mTotalHeaderProtectionHeight = headerBottomWithScaleOnPhone;
|
||||
}
|
||||
|
||||
// If tab exist (such as work profile), extend header with tab height
|
||||
@@ -1463,9 +1466,18 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
right,
|
||||
tabBottomWithScale,
|
||||
mHeaderPaint);
|
||||
mTotalHeaderProtectionHeight = tabBottomWithScale;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The height of the header protection is dynamically calculated during the time of drawing the
|
||||
* header.
|
||||
*/
|
||||
float getHeaderProtectionHeight() {
|
||||
return mTotalHeaderProtectionHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* redraws header protection
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user