Allow clipping individual direction of TaskView
- Only clip the nav bar (taskbar), and always do that in tablets regardless of whether taskbar is stashed, so TaskView always have the same ratio (mocks: https://docs.google.com/presentation/d/1_3zQak_C9FzDPCcIdYagfUit4QyqfdRxetkim3dI9rY/edit#slide=id.ge211eb96a5_5_8) - When taskbar is present, don't use full thumbnail to avoid TaskView resizing in fullscreen: http://dr/file/d/18C8DSygPBU1gkmMQPPIIa2NqQESFurxW/view?resourcekey=0-8W79f31gstzI_1ZPpHulBQ - When taskbar is stashed, we still need full thumbnail to gradually crop out the taskbar in overview Test: Open Chrome, swipe up and ensure status bar inset stays in overview but taskbar stays clipped out from the onset. Bug: 190681228 Change-Id: I9d563572f2e6800e90d567c2bfae4528a126f24e
This commit is contained in:
@@ -146,19 +146,39 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
public static final float MAX_PAGE_SCRIM_ALPHA = 0.4f;
|
||||
|
||||
/**
|
||||
* Should the TaskView display clip off the status and navigation bars in recents. When this
|
||||
* is false the overview shows the whole screen scaled down instead.
|
||||
* Should the TaskView display clip off the left inset in RecentsView.
|
||||
*/
|
||||
public static boolean clipStatusAndNavBars(DeviceProfile deviceProfile) {
|
||||
return deviceProfile.isTaskbarPresentInApps;
|
||||
public static boolean clipLeft(DeviceProfile deviceProfile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the TaskView display clip off the top inset in RecentsView.
|
||||
*/
|
||||
public static boolean clipTop(DeviceProfile deviceProfile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the TaskView display clip off the right inset in RecentsView.
|
||||
*/
|
||||
public static boolean clipRight(DeviceProfile deviceProfile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the TaskView display clip off the bottom inset in RecentsView.
|
||||
*/
|
||||
public static boolean clipBottom(DeviceProfile deviceProfile) {
|
||||
return deviceProfile.isTablet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should the TaskView scale down to fit whole thumbnail in fullscreen.
|
||||
*/
|
||||
public static boolean useFullThumbnail(DeviceProfile deviceProfile) {
|
||||
return deviceProfile.isTaskbarPresentInApps;
|
||||
};
|
||||
return deviceProfile.isTablet && !deviceProfile.isTaskbarPresentInApps;
|
||||
}
|
||||
|
||||
private static final float EDGE_SCALE_DOWN_FACTOR_CAROUSEL = 0.03f;
|
||||
private static final float EDGE_SCALE_DOWN_FACTOR_GRID = 0.00f;
|
||||
|
||||
Reference in New Issue
Block a user