From 44cc3a2e2163a22cda1d08aabbfdab75e98338cd Mon Sep 17 00:00:00 2001 From: Thales Lima Date: Fri, 18 Mar 2022 14:28:24 +0000 Subject: [PATCH] Add more border space options This give options to landscape layouts to have different border options Bug: 222109350 Test: manual and HSV Change-Id: If823dd09c945438f77e57ff80a8a0c4fc0b4c8a6 --- res/values/attrs.xml | 7 +++++++ src/com/android/launcher3/InvariantDeviceProfile.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 620eb7b0fa..4ed31f8968 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -215,6 +215,13 @@ + + + + + + diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index 25fd643b11..9dd1493d16 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -838,6 +838,8 @@ public class InvariantDeviceProfile { minCellSize[INDEX_TWO_PANEL_LANDSCAPE] = new PointF(x, y); float borderSpace = a.getFloat(R.styleable.ProfileDisplayOption_borderSpace, 0); + float borderSpaceLandscape = a.getFloat( + R.styleable.ProfileDisplayOption_borderSpaceLandscape, borderSpace); float borderSpaceTwoPanelPortrait = a.getFloat( R.styleable.ProfileDisplayOption_borderSpaceTwoPanelPortrait, borderSpace); float borderSpaceTwoPanelLandscape = a.getFloat( @@ -846,6 +848,11 @@ public class InvariantDeviceProfile { x = a.getFloat(R.styleable.ProfileDisplayOption_borderSpaceHorizontal, borderSpace); y = a.getFloat(R.styleable.ProfileDisplayOption_borderSpaceVertical, borderSpace); borderSpaces[INDEX_DEFAULT] = new PointF(x, y); + + x = a.getFloat(R.styleable.ProfileDisplayOption_borderSpaceLandscapeHorizontal, + borderSpaceLandscape); + y = a.getFloat(R.styleable.ProfileDisplayOption_borderSpaceLandscapeVertical, + borderSpaceLandscape); borderSpaces[INDEX_LANDSCAPE] = new PointF(x, y); x = a.getFloat(