Merge "Add special column for All Apps button in FocusLogic's sparse matrix." into ub-launcher3-burnaby-polish

This commit is contained in:
Tony Wickham
2015-12-03 20:41:28 +00:00
committed by Android (Google) Code Review
4 changed files with 232 additions and 50 deletions

View File

@@ -223,20 +223,18 @@ public class FocusHelper {
if (keyCode == KeyEvent.KEYCODE_DPAD_UP &&
!profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout,
true /* hotseat horizontal */, profile.inv.hotseatAllAppsRank,
iconRank == profile.inv.hotseatAllAppsRank /* include all apps icon */);
true /* hotseat horizontal */, profile.inv.hotseatAllAppsRank);
iconIndex += iconParent.getChildCount();
countX = iconLayout.getCountX();
countX = hotseatLayout.getCountX();
countY = iconLayout.getCountY() + hotseatLayout.getCountY();
parent = iconParent;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT &&
profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout,
false /* hotseat horizontal */, profile.inv.hotseatAllAppsRank,
iconRank == profile.inv.hotseatAllAppsRank /* include all apps icon */);
false /* hotseat horizontal */, profile.inv.hotseatAllAppsRank);
iconIndex += iconParent.getChildCount();
countX = iconLayout.getCountX() + hotseatLayout.getCountX();
countY = iconLayout.getCountY();
countY = hotseatLayout.getCountY();
parent = iconParent;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT &&
profile.isVerticalBarLayout()) {
@@ -352,15 +350,15 @@ public class FocusHelper {
// with the hotseat.
if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN && !profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout, true /* horizontal */,
profile.inv.hotseatAllAppsRank,
!hotseat.hasIcons() /* ignore all apps icon, unless there are no other icons */);
countY = countY + 1;
profile.inv.hotseatAllAppsRank);
countX = hotseatLayout.getCountX();
countY = countY + hotseatLayout.getCountY();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT &&
profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout, false /* horizontal */,
profile.inv.hotseatAllAppsRank,
!hotseat.hasIcons() /* ignore all apps icon, unless there are no other icons */);
countX = countX + 1;
profile.inv.hotseatAllAppsRank);
countX = countX + hotseatLayout.getCountX();
countY = hotseatLayout.getCountY();
} else if (isUninstallKeyChord(e)) {
matrix = FocusLogic.createSparseMatrix(iconLayout);
if (UninstallDropTarget.supportsDrop(launcher, itemInfo)) {