mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Enable variable size thumbnail for large screen
- Introduced a feature flag - Refresh TaskView size when thumbnail is refreshed or Recents resizes - Disable edge scale down in large screens - Added temp method to get task width/height ratio - In fullscreen, scale down TaskThumbnailView and disable TaskView elevation - Task boxing mechanism: http://screen/3NkePthAVUVH2Rv.png Bug: 174464656 Test: Manually test overview and quickswitch for folded and unfolded, including with RTL. Change-Id: I2ce24d588a246cc6a2408039a37d884021aa0800
This commit is contained in:
@@ -745,6 +745,11 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
return mOrientationHandler.getChildStart(pageAtIndex);
|
||||
}
|
||||
|
||||
protected int getChildVisibleSize(int index) {
|
||||
View layout = getPageAt(index);
|
||||
return mOrientationHandler.getMeasuredSize(layout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requestChildRectangleOnScreen(View child, Rect rectangle, boolean immediate) {
|
||||
int page = indexToPage(indexOfChild(child));
|
||||
@@ -1457,8 +1462,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
}
|
||||
|
||||
private int getDisplacementFromScreenCenter(int childIndex, int screenCenter) {
|
||||
View layout = getPageAt(childIndex);
|
||||
int childSize = mOrientationHandler.getMeasuredSize(layout);
|
||||
int childSize = getChildVisibleSize(childIndex);
|
||||
int halfChildSize = (childSize / 2);
|
||||
int childCenter = getChildOffset(childIndex) + halfChildSize;
|
||||
return childCenter - screenCenter;
|
||||
|
||||
Reference in New Issue
Block a user