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

am: b879abd274

* commit 'b879abd2747c1c1473c8d2b9d9c97707da8218f3':
  Add special column for All Apps button in FocusLogic's sparse matrix.
This commit is contained in:
Tony Wickham
2015-12-03 20:45:25 +00:00
committed by android-build-merger
4 changed files with 232 additions and 50 deletions

View File

@@ -224,20 +224,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()) {
@@ -353,15 +351,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)) {