summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/FocusHelper.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-08-14 12:57:28 -0700
committerAdam Cohen <adamcohen@google.com>2014-08-14 13:15:32 -0700
commita00673c7d9f3fcfc81a6e1c6aa7b831951331e84 (patch)
tree3ee6a8e89c1dad5b19914da79ae77199699aff33 /src/com/android/launcher3/FocusHelper.java
parent63f1ec00fbbd109130d1e476371dbc9a87bb544d (diff)
downloadandroid_packages_apps_Trebuchet-a00673c7d9f3fcfc81a6e1c6aa7b831951331e84.tar.gz
android_packages_apps_Trebuchet-a00673c7d9f3fcfc81a6e1c6aa7b831951331e84.tar.bz2
android_packages_apps_Trebuchet-a00673c7d9f3fcfc81a6e1c6aa7b831951331e84.zip
Fix issues with the new widget layout
-> use first layout instead of first measure to determine size -> fix issue where we were doubly accounting for padding of AppsCustomizePagedView -> show page backgrounds by default, hide fake page by default -> stripping some dead code related to the market button and all apps cling Change-Id: I787bdf1092c821b780670098fb219a8a68914bc8
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-rw-r--r--src/com/android/launcher3/FocusHelper.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java
index b1250ceea..df5e0fc33 100644
--- a/src/com/android/launcher3/FocusHelper.java
+++ b/src/com/android/launcher3/FocusHelper.java
@@ -57,16 +57,6 @@ class HotseatIconKeyEventListener implements View.OnKeyListener {
}
}
-/**
- * A keyboard listener we set on the last tab button in AppsCustomize to jump to then
- * market icon and vice versa.
- */
-class AppsCustomizeTabKeyEventListener implements View.OnKeyListener {
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- return FocusHelper.handleAppsCustomizeTabKeyEvent(v, keyCode, event);
- }
-}
-
public class FocusHelper {
/**
* Private helper to get the parent TabHost in the view hiearchy.
@@ -80,41 +70,6 @@ public class FocusHelper {
}
/**
- * Handles key events in a AppsCustomize tab between the last tab view and the shop button.
- */
- static boolean handleAppsCustomizeTabKeyEvent(View v, int keyCode, KeyEvent e) {
- final AppsCustomizeTabHost tabHost = findTabHostParent(v);
- final ViewGroup contents = tabHost.getContent();
- final View shop = tabHost.findViewById(R.id.market_button);
-
- final int action = e.getAction();
- final boolean handleKeyEvent = (action != KeyEvent.ACTION_UP);
- boolean wasHandled = false;
- switch (keyCode) {
- case KeyEvent.KEYCODE_DPAD_RIGHT:
- if (handleKeyEvent) {
- // Select the shop button if we aren't on it
- if (v != shop) {
- shop.requestFocus();
- }
- }
- wasHandled = true;
- break;
- case KeyEvent.KEYCODE_DPAD_DOWN:
- if (handleKeyEvent) {
- // Select the content view (down is handled by the tab key handler otherwise)
- if (v == shop) {
- contents.requestFocus();
- wasHandled = true;
- }
- }
- break;
- default: break;
- }
- return wasHandled;
- }
-
- /**
* Returns the Viewgroup containing page contents for the page at the index specified.
*/
private static ViewGroup getAppsCustomizePage(ViewGroup container, int index) {