mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Dyanmically lay out overview mode across all orientations and form factors.
Change-Id: I788bbf289717b30b19afc9ad9d611c85715bc623
This commit is contained in:
@@ -786,14 +786,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
|
||||
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
|
||||
// NOTE: We multiply by 1.5f to account for the fact that depending on the offset of the
|
||||
// NOTE: We multiply by 2f to account for the fact that depending on the offset of the
|
||||
// viewport, we can be at most one and a half screens offset once we scale down
|
||||
DisplayMetrics dm = getResources().getDisplayMetrics();
|
||||
int maxSize = Math.max(dm.widthPixels + mInsets.left + mInsets.right,
|
||||
dm.heightPixels + mInsets.top + mInsets.bottom);
|
||||
|
||||
int parentWidthSize = (int) (1.5f * maxSize);
|
||||
int parentHeightSize = maxSize;
|
||||
int parentWidthSize = (int) (2f * maxSize);
|
||||
int parentHeightSize = (int) (2f * maxSize);
|
||||
int scaledWidthSize, scaledHeightSize;
|
||||
if (mUseMinScale) {
|
||||
scaledWidthSize = (int) (parentWidthSize / mMinScale);
|
||||
|
||||
Reference in New Issue
Block a user