Simplify vertical bar hotseat bottom calculation for spring loaded state.
Fix: 236941743 Test: manual. Change-Id: I7f110fea48eb88e7f941a64c17a65feec14531f3
This commit is contained in:
1 parent
f52a13e424
commit
a7335bccdc
5 files changed
+128
-135
No files matched your search
@@ -930,15 +930,12 @@ public class DeviceProfile {
|
||||
* Gets the space in px from the bottom of last item in the vertical-bar hotseat to the
|
||||
* bottom of the screen.
|
||||
*/
|
||||
public int getVerticalHotseatLastItemBottomOffset() {
|
||||
private int getVerticalHotseatLastItemBottomOffset() {
|
||||
int cellHeight = calculateCellHeight(
|
||||
heightPx - mHotseatPadding.top - mHotseatPadding.bottom, hotseatBorderSpace,
|
||||
numShownHotseatIcons);
|
||||
int hotseatSize = (cellHeight * numShownHotseatIcons)
|
||||
+ (hotseatBorderSpace * (numShownHotseatIcons - 1));
|
||||
int extraHotseatEndSpacing = (heightPx - hotseatSize) / 2;
|
||||
int extraIconEndSpacing = (cellHeight - iconSizePx) / 2;
|
||||
return extraHotseatEndSpacing + extraIconEndSpacing + mHotseatPadding.bottom;
|
||||
return extraIconEndSpacing + mHotseatPadding.bottom;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -953,7 +950,7 @@ public class DeviceProfile {
|
||||
/**
|
||||
* Gets the scaled bottom of the workspace in px for the spring-loaded edit state.
|
||||
*/
|
||||
private float getCellLayoutSpringLoadShrunkBottom() {
|
||||
public float getCellLayoutSpringLoadShrunkBottom() {
|
||||
int topOfHotseat = hotseatBarSizePx + springLoadedHotseatBarTopMarginPx;
|
||||
workspaceSpringLoadShrunkBottom =
|
||||
heightPx - (isVerticalBarLayout() ? getVerticalHotseatLastItemBottomOffset()
|
||||
|
||||
Reference in new issue
Block a user