Updating landscape layout for launcher/quickstep

> Hotseat is tied to navbar (on left in seascape)
> Search box shows up in Overview (clicking it would crash for now)
> All-apps is no longer fullscreen in landscape
> Recents cards are appropriately scaled down
> Hotseat is visible in Overview

Bug: 70179916
Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
This commit is contained in:
Sunny Goyal committed 2018-01-08 13:53:44 -08:00
1 parent 07b1d670f2
commit 228153d92a
32 files changed
+397 -500

No files matched your search

@@ -35,16 +35,43 @@ public class NinePatchDrawHelper {
private final RectF mDst = new RectF();
public final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
/**
* Draws the bitmap split into three parts horizontally, with the middle part having width
* as {@link #EXTENSION_PX} in the center of the bitmap.
*/
public void draw(Bitmap bitmap, Canvas canvas, float left, float top, float right) {
int width = bitmap.getWidth();
int height = bitmap.getHeight();
mSrc.top = 0;
mSrc.bottom = height;
mDst.top = top;
mDst.bottom = top + height;
draw3Patch(bitmap, canvas, left, right);
}
/**
* Draws the bitmap split horizontally into 3 parts (same as {@link #draw}) and split
* vertically into two parts, bottom part of size {@link #EXTENSION_PX} / 2 which is
* stretched vertically.
*/
public void drawVerticallyStretched(Bitmap bitmap, Canvas canvas, float left, float top,
float right, float bottom) {
draw(bitmap, canvas, left, top, right);
// Draw bottom stretched region.
int height = bitmap.getHeight();
mSrc.top = height - EXTENSION_PX / 4;
mSrc.bottom = height;
mDst.top = top + height;
mDst.bottom = bottom;
draw3Patch(bitmap, canvas, left, right);
}
private void draw3Patch(Bitmap bitmap, Canvas canvas, float left, float right) {
int width = bitmap.getWidth();
int halfWidth = width / 2;
// Draw left edge