summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/FocusHelper.java
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanupSunny Goyal2015-06-051-6/+6
| | | | | | | | > Removing obsolete logging > Removing unused methods > Removing resource leak warning due to non-static handler class in launcher Change-Id: Ic38cc8aea82899b0b5ee3235f04e5964e49245fb
* Removing some synthetic method creationSunny Goyal2015-06-021-1/+1
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Creating landscape and portrait device profiles at app initializationSunny Goyal2015-05-221-7/+8
| | | | Change-Id: Ide9d007adc36b348e19b05cdf49e87f8b02db60e
* Refactoring DeviceProfileAdam Cohen2015-05-211-16/+19
| | | | | | | | | | | | | | | | | | | | -> Pulling out the parts of device profile which can (and need to be) initialized and accessed without access to an Activity context, ie. the invariant bits. -> The invariant bits are stored in InvariantDeviceProfile which is initialized statically from LauncherAppState. -> The DeviceProfile contains the Activity context-dependent bits, and we will create one of these for each Activity instance, and this instance is accessed through the Launcher activity. -> It's possible that we can continue to refactor this such that all appropriate dimensions can be computed without an Activity context (by only specifying orientation). This would be an extension of this CL and allow us to know exactly how launcher will look in both orientations from any context. Sets the stage for some improvements around b/19514688 Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
* Fixing issue where the prediction bar apps are not focused.Winson Chung2015-05-211-2/+4
| | | | | | - Also fixes issue where all apps is not accessible by keyboard when there are no other apps in the hotseat. Bug: 21334471
* Fixing folder focus logicSunny Goyal2015-04-161-99/+56
| | | | | | | | | | > Folder items no longer remain in a linear order when a folder gets rearranged, and se we need to use createSparseMatrix instead of createFullArray. Also because of this we need to use getChildAt(x, y) instead of getChildAt(index) > Removing traces of AppsCustomizePage (all apps) from FocusHelper Change-Id: I9007f6b95cb823e27ef4a43ce725fda8ef1b7cf8
* Focus handling null pointer exception during monkey tests.Hyunyoung Song2015-04-161-1/+9
| | | | | | | | | - Also fix a bug where the focus is not navigating to the next page when there isn't an icon within +45 and -45 range of the origin. b/20294717 Change-Id: I16dac5c6a0463fbc9f56a447abedad18abadde98
* Focus handling - RTL supportHyunyoung Song2015-04-131-169/+122
| | | | | | | | | | | - Support LEFT and RIGHT keys to work across workspaces when in RTL mode. - Folder icons navigate correctly on DPAD_LEFT/RIGHT events - Folder navigation across pages also works correctly - Deleted dead code inside FocusHelper b/20120358 Change-Id: I7f851cb7ed31f666a91b2f856458d7966ea5f712
* Reducing method count by eliminating synthetic accessorsAdam Cohen2015-03-201-2/+3
| | | | | | | | | | | Elimates 304 methods based on dex analysis The java compiler generates sythetic accessor methods for all private fields, methods and contructors accessed from inner classes. By marking them package-private and @Thunk instead, sythentic accessor methods are no longer needeed. These annotated elements should be treated as private. Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
* key event focus logic should support large tabletsHyunyoung Song2015-03-171-18/+25
| | | | | | | | | | | TL;DR;; On smaller tablets, landscape = vertical hotseat bar, and portrait = horizontal hotseat bar. However, in larger tablets, hotseat bar is always horizontal. This is now correctly handled using DeviceProfile.isVerticalBar method. b/19732584 Change-Id: I1035c89b4685be12dbc863f8a1465047a5fec6a6
* Adding a scrollable folder content implementationSunny Goyal2015-03-091-8/+37
| | | | | | | | > Size is restricted to 3x3 for now > Drag-drop across page s not implemented yet > A-Z sorting is not implemented yet Change-Id: I84328caa6ad910d1edeeac6f3a7fb61b7292ea7e
* Merge "Refactoring folder content" into ub-launcher3-burnabySunny Goyal2015-03-051-3/+1
|\
| * Refactoring folder contentSunny Goyal2015-03-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | > Refactoring the CellLayout in folder with a custom view so that it can be replaced easily with a scrollable paged view. > Moving some methods from the folder to this new view which assume a single page layout for the folder > Changing folder from LinearLayout to FrameLayout to properly handle focus traversal in case of multi-page folders Change-Id: I073c00b995488f9f5d8123b00357e094ca2cec7c
* | Fix the broken build from recent focus navigation handling codeHyunyoung Song2015-03-041-2/+2
| | | | | | | | | | | | (compilation error). Change-Id: I9beb63a88f8c7c247f397d0495501dbc0f637456
* | [key event focus] DPAD navigates to the nearest item on next/previous pageHyunyoung Song2015-03-031-1/+45
|/ | | | | | | | | | | | | | | | b/19381790 b/16351792 TL;DR;; Previously, when RIGHT is handled on the right most column of the current page or when LEFT is handled on the left most column, the next icon of focus is next page 'first' icon or the previous page 'last icon'. With this change, the row information is preserved when trying to locate an icon to give focus in the next/previous page. Next CL: long awaited unit tests that capture corner cases for different orientation/ device configuration. Change-Id: I5278bed45275b3e4cb39fb698df35f90bb45a415
* [key event focus handling] (1)hotseat <-> icon now symmetric, (2)support DEL ↵Hyunyoung Song2015-02-241-27/+45
| | | | | | | | | | | | | | | | | | | keycode TL;DR; (1) Key event navigation from and to the hotseat and icons in the workspace is now symmetric. Since there is one more icon in the hotseat, only left N-1 icon navigation was symmetric. (2) KeyEvent.KEYCODE_DEL and KeyEvent.KEYCODE_FORWARD_DEL can now delete icons from the workspace. The focus move to the previous icon where the focus traveled from. Also contains minor styling and indexing issues. Bug: 15408321 Bug: 19381790 Change-Id: I16cbcb2693e92eebb830997d01c0bf674073dd51
* [key event focus handling] Cleanup/Refactor/FeatureHyunyoung Song2015-02-201-530/+296
| | | | | | | | | | | | | | 1) Focus navigation handling is refactored to Focus utility class. New 2 step dpad navigation algorithm is inside Focus class 2) Introduced a map (or matrix) that indicates where sparse icons are located inside a grid. This enables getting rid of the icon sorting logic which was costly. 3) Unified all the dpad handling logic inside the handleXXKeyEvent methods 4) DOWN/UP key will allow navigation between workspace icons and the hotseat 5) Folder icons allow DOWN/UP to navigate to the title b/19381790 Change-Id: Id45b3f215ef7c1ca5f99b08e3d721e219298627a
* Removing AccessibleTabView and some other dead code.Sunny Goyal2014-10-211-208/+0
| | | | Change-Id: Ia122a6277f924e6077dbf15a4dc40b5042aa987d
* Changing hotseat keyboard controlsSunny Goyal2014-08-201-41/+82
| | | | | | | | | | > Left and right keys don not navigate to next/prev page > Down arrow on apps apps last row, do not take the focus to the end > Nagivation sounds when focus changes issue: 16352221 Change-Id: I5982f22dc80c408673092f8fa8ca1b2fc6381635
* Updating the icon click feedbackSunny Goyal2014-08-191-14/+7
| | | | | | | | | > Using BubbleTextView everywhere, removed PagedIconView > There is a brightness feedback on touch and shadow feedback on click, until app launches issue: 16878374 Change-Id: I3dc1149a123c8a75feca6210948398bf2187f1f2
* Fix issues with the new widget layoutAdam Cohen2014-08-141-45/+0
| | | | | | | | | | | -> 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
* Fix crash with keyboard focus in AllApps due to view refactoringAdam Cohen2014-07-241-15/+9
| | | | | | issue 16478600 Change-Id: I0300e7ffb332b689e3412e764ab7ce59c4fc5748
* Fixing drop targets in phone / small tablet landscape (issue 12192781)Adam Cohen2014-01-141-1/+1
| | | | Change-Id: I4dc8a82c8cd5ef279506e7868e33a455fba5a3be
* Initial changes to restore AllApps.Winson Chung2013-09-051-5/+5
| | | | | | | - Removes unused all apps code due to dynamic grid/spacing - Attempts to use CellLayout instead of PagedViewCellLayout Change-Id: I3c49bca9fc35dfeaf250591fd63bc7f36119968f
* Updating focus helper to account for change in Folder layout hierarchy. (Bug ↵Winson Chung2013-07-251-1/+3
| | | | | | 9626867) Change-Id: I8d6cce9089913de987316c9790ecfb301ca1f218
* Lazily instantiate LauncherAppState.Daniel Sandler2013-06-271-3/+1
| | | | | | | | The application context for LauncherAppState is supplied by the application whenever it starts; don't ask for an instance before that. Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
* Move LauncherApplication's state and code to LauncherAppState.Daniel Sandler2013-06-111-1/+1
| | | | | | | | This removes Launcher's static data and other state out of the Application object. Now LauncherApplication (extends Application) exists only to instantiate LauncherAppState. Change-Id: I4e323bd78b77536b92054105536a55c0c2c19ba8
* Launcher2 is now Launcher3.Daniel Sandler2013-06-051-0/+898
Changes include - moving from com.android.launcher{,2} to com.android.launcher3 - removing wallpapers - new temporary icon Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b