summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
Commit message (Collapse)AuthorAgeFilesLines
* Launcher3: custom gridJoey Rizzoli2018-01-191-1/+1
| | | | | Signed-off-by: Arne Coucheron <arco68@gmail.com> Signed-off-by: Joey Rizzoli <joey@lineageos.org>
* Larger icons for L3Go and spacing changes.Jon Miranda2017-10-031-3/+15
| | | | | | | | | | | There are cases (ie. smaller devices) where the icon label is closer to the icon below it (rather than its corresponding icon). To fix this, we ensure that the drawable padding (space between the icon and its label) is no larger than the vertical padding of the cell. Bug: 67317867 Change-Id: Ic3729726eebb60b67d658361c4335e724b7d68d7
* Merge "Fix bug where mw landscape cell size is calculated incorretly." into ↵TreeHugger Robot2017-08-301-0/+4
|\ | | | | | | ub-launcher3-dorval-polish2
| * Fix bug where mw landscape cell size is calculated incorretly.Jon Miranda2017-08-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the height we pass to the multi-window DeviceProfile includes the top insets, so we tell widgets that the cell size height is larger than it actually is. We use Display#getSize to pass in the size of the window in multi-window mode. The docs say "the returned size may be adjusted to exclude certain system decor elememts." To ensure that system decor elements is always excluded, we take the minimum sizes of the main profile and it's multi-window variant -- since the multi-window DeviceProfile sizes are never going to be larger. Bug: 64851168 Change-Id: I274f838c54f3d01d43dc51e0ff921a6124e12cf7
* | Increase overview icon zone percentage from 20% to 22%.Jon Miranda2017-08-281-4/+5
|/ | | | | | | | | This handles the case where "Home Settings" text is split into two lines and is cropped when the user is in multi-window mode with settings Display=Largest and Font=Largest. Bug: 64976707 Change-Id: Ia1a4ee35a94a2fbe99f8ed25fce93a023e621147
* Update hotseat cell height calculation.Jon Miranda2017-08-091-1/+1
| | | | | | | | | | | The hotseat never has text, so we remove the icon drawable padding from the height calculation. This allows the items in the hotseat to be centered vertically properly. Bug: 63996463 Change-Id: Ie0c5706ae6edeafae321ca024c066439d40ca237
* Landscape launcher grid/all apps to spec.Jon Miranda2017-08-011-45/+65
| | | | | | | * Moves FastScroller to the right. Bug: 64160529 Change-Id: Ie0dfc0a2f0f2d6f6366e4f299769148d76017782
* More launcher grid updates.Jon Miranda2017-07-281-9/+9
| | | | | | | | | | | | * Increase padding when in All Apps landscape. * Calculate aspectRatio using width/height instead of availableWidth/Height. * Instead of increasing page indicator size, we add the extra height to the Hotseat. Bug: 63996463 Bug: 63149981 Change-Id: I1ee3549b4089b277704d5d72e1b7cb5a2abdbd5a
* Merge "Launcher grid changes." into ub-launcher3-dorval-polishTreeHugger Robot2017-07-261-9/+13
|\
| * Launcher grid changes.Jon Miranda2017-07-251-9/+13
| | | | | | | | | | | | | | | | * Tighten up space on Workspace/All Apps for tall devices. * Decrease the cell layout padding. Bug: 63996463 Change-Id: Ifc89e4786b7033e2af77d3742006d8c9ee719081
* | Revert "Update Folders to match spec."Jonathan Miranda2017-07-261-7/+3
|/ | | | | | This reverts commit fd8fa136f5cec15302bf48bdd60761e057f960c4. Change-Id: Ifb8ce81e23f38df2eb2c26f93376eca19caae5b1
* Manually compute all apps cell height in multi-window mode.Jon Miranda2017-07-241-11/+20
| | | | | | | | | The All Apps cell height is set to match the Workspace. This causes a problem in multi-window mode because only the Workspace items do not have labels. Bug: 63933609 Change-Id: I13be6e50c12d50465be0555721f273abfc0d836a
* Update Folders to match spec.Jon Miranda2017-07-201-3/+7
| | | | | Bug: 63825895 Change-Id: Ia1a139f1afd944eefcd370645142227317e2bf20
* Factor in CellLayout padding in cell size calculation.Jon Miranda2017-07-181-1/+2
| | | | | Bug: 63753505 Change-Id: I221dfb1d486110f8de3994085d917c12f82bcd0f
* Tighten up vertical spacing in landscape all apps.Jon Miranda2017-07-141-1/+7
| | | | | | Bug: 37015359 Bug: 62801588 Change-Id: Ia4bdc2c2b12647cd671cf8a3e7a8defc43863da1
* Move padding from Hotseat to Hotseat's CellLayout.Jon Miranda2017-07-141-6/+10
| | | | | Bug: 63590728 Change-Id: I3ba6ba83b83897d75cc4445a7dab9c5b8b7b8ff1
* Set edgeMarginPx back to 8dp.Jon Miranda2017-07-131-5/+8
| | | | | | | | | | | | | With the new grid changes, it was set to 16dp but this caused an issue where the workspace page spacing was too large. To "restore" the original page spacing we set it back to 8dp. This caused an issue where the pages began to overlap. This CL changes the edgeMarginPx back to 8dp, and then adds the additional 8dp to the padding of the CellLayout. Bug: 63590728 Change-Id: Ie968d8bd81de19c726f73581d6609e3bc486c5ca
* New calculation for page indicator size on tall devices.Jon Miranda2017-07-061-5/+21
| | | | | | | | | For a display with a large aspect ratio, the icons can get too far spread out in portrait mode. We remedy this by adjusting the page indicator height to utilize that extra space. Bug: 62801588 Change-Id: Ib717dd32a20918248b59e1b46b4e881d6d6a7cb5
* Grid change polish bugs.Jon Miranda2017-06-251-2/+2
| | | | | | | | | | | | | - Folder icons were too small in landscape. - Folders can now be 16dp away from the edge (used to be 64dp which resulted in super small folders) - Decrease page spacing back to 8dp - Decrease PreviewBackground accept scale factor since hotseat is now generally smaller. Bug: 37014334 Bug: 37015359 Change-Id: Icbb53d34136bfdb93796d48f7379da6b9e214345
* Landscape grid changes for Workspace/All Apps.Jon Miranda2017-06-231-45/+84
| | | | | | | | This is the just first CL to get eyes on the changes. Next CL will update the All Apps to be full width. Bug: 37015359 Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
* Portrait grid changes for Workspace/All Apps.Jon Miranda2017-06-191-11/+13
| | | | | Bug: 37015359 Change-Id: Ifbdd0e71c36e532b189e02283e3eeb562ebe2654
* Spread out overview buttons in landscapeTony2017-06-161-2/+2
| | | | | Bug: 62574356 Change-Id: I7a959604bc57f8526ea827857da47d719746aba7
* Removing QsbBlockerViewSunny Goyal2017-06-061-8/+0
| | | | | | | | | > Removing workspace state change listener. State change happens with hardware layer, so children should not be calling invalidatge() during the animation > Moving QSB inside the QSB and removing a floating layout Bug: 37616877 Change-Id: I9af3522a05dafa5796586bb64f512d98688caf79
* Aligning the search box with bottom of hotseat iconsSunny Goyal2017-05-171-3/+3
| | | | | Bug: 37616877 Change-Id: I153e754db8e6c96b47ab644e19ce110f56bf852e
* Removing padding override in multi-window modeSunny Goyal2017-05-121-3/+0
| | | | | Bug: 37870754 Change-Id: Ia9fa51dccbd425874245bd312c0b0e087257fa81
* Separating top and bottom paddings for the hotseatSunny Goyal2017-04-261-3/+6
| | | | | | Bug: 37616877 Change-Id: I2f187576c28d62f9bb8257c9b9295edb7a8e44c0 (cherry picked from commit 751e41eb666e3ad19f1d0ca8eeebe3b2265795fc)
* Update icon badges to match specTony Wickham2017-04-251-2/+3
| | | | | | | | | | | | | - Size defined as percentage of app icon size - Width changes when there are 2 or 3 digits (round rect) - Offset slightly away from the app icon - Had to move drawing to BubbleTextView instead of FastBitmapDrawable - Hide badge when dragging and while popup is open - Tweaks for some color/text parameters Bug: 35744066 Change-Id: Ibb15ca634abaa0729aea637c904c4c6889a58c7c
* Add checks for FeatureFlags.QSB_ON_FIRST_SCREENLouis Begin2017-03-081-4/+8
| | | | | | | | | | | | | When false, it correctly does not show the QSB but leaves a default style search bar which cannot be removed. Add checks to control default view visibility in device profile layout & re-layout, QSB container and in Workspace's onMeasure Bug: 35967694 Change-Id: I3d0f89e1022d838eeb95762fd1fb3f7257956c41
* Show notification icon in place of "1" in badge.Tony Wickham2017-02-071-3/+1
| | | | | | | | | | | | | | | - When notifications update, add the NotificationInfo to the BadgeInfo if there is only one for an app. BadgeRenderer will use the NotificationInfo to get the icon to draw. - When retrieving the icon from the NotificationInfo, we draw it into a shader (similar to MaskableIconDrawable), which is rendered by BadgeRenderer. - For now, we only use the notification icon if it is large. Bug: 34839959 Bug: 32410600 Bug: 33553066 Change-Id: I31851804008dd15bab75d2759441187830c3265e
* FastBitmapDrawable can draw an icon badge (notification count)Tony Wickham2017-01-131-1/+8
| | | | | | | | | | | | | - Added BadgeInfo to contain data to be shown in a badge (currently just notification count). - Added BadgeRenderer in DeviceProfile to contain things relevant to drawing the badge, such as size and Paint's. - Added IconPalette to compute colors for the badge based on a dominant color (will also be used for notifications) - FastBitmapDrawable uses these classes to draw the badge. Bug: 32410600 Change-Id: I6595a4879943357590f7d20c22594691a573ecaf
* Removing FeatureFlag.LAUNCHER3_LEGACY_WORKSPACE_DND and corresponding logicSunny Goyal2016-12-151-7/+2
| | | | Change-Id: Ie10c087b4f72ee27be5bf12e2c81be5b7a3a6176
* Scale folders to fit within the available height and width.Jon Miranda2016-12-131-14/+20
| | | | | | | | | | | * In the previous implementation, the folder icon size would not get updated if the cell height/width was set to the minimum value not including the folderChildIconSizePx AND the usedLength was less than the maxLength. * The bug is only really noticeable in an unlikely multi-window landscape mode, which is why it was not noticed before. Change-Id: I776c6f710e081645cff891487022cf787869ee3f
* Merge "Defining various modes for CellLayout: Workspace, Hotseat & Folder" ↵Sunny Goyal2016-12-121-0/+14
|\ | | | | | | into ub-launcher3-master
| * Defining various modes for CellLayout: Workspace, Hotseat & FolderSunny Goyal2016-11-211-0/+14
| | | | | | | | | | | | | | > Moving the definition of modes to xml > Defining attributes in xml Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
* | Scale widgets in multi-window mode.Jon Miranda2016-11-231-0/+10
|/ | | | | | | | | To keep this CL small and focused, I'm going to create a separate CL that handles the scaling for the widget in drag and drop mode. Bug: 32176631 Change-Id: Id6557d070edb664aa1f4851de7abf494cf8a0677
* Add bottom padding to hotseat in multi-window mode.Jon Miranda2016-11-151-3/+9
| | | | | | | | | | In multi-window mode, the navigation bar is black which makes the hotseat's top padding -- and lack of symmetric botom padding -- super apparent. We add bottom padding to the hotseat so that the hotseat icons remain visually centered. Bug: 32176631 Change-Id: I3eebf5ab98898c8ee092bda6ec48c6afdcd353b9
* Hide workspace text in multi-window mode.Jon Miranda2016-11-151-1/+9
| | | | | | | | | * Vertically centers workspace icons. * New iconDisplay value so shortcut text is not overriden. Bug: 32176631 Change-Id: I86753bab5b24aafc417e0f77d8c471fc4c0dc7f0
* Refactor edge of screen detection code.Jon Miranda2016-11-071-3/+3
| | | | | | There were two resources that both defined the edge of the screen. Change-Id: I82ab553cc3123ef54ff1f0c692d29f3678ad04ac
* Scale down folder cells to fit within bounds if necessary.Jon Miranda2016-11-041-25/+45
| | | | | | | | | The number of folder cols/rows are set in InvariantDeviceProfile. Because of this, we may need to scale down the folder cells in multi-window mode. Bug: 32176631 Change-Id: I925d5ac9d29439c5d61cf089e7784065a8cb5ebd
* Remove unused code in DeviceProfile.Jon Miranda2016-11-021-11/+1
| | | | Change-Id: I463302e6711ad39241257b8dff058d9f3e99d883
* Center overview panel buttons.Jon Miranda2016-11-021-8/+3
| | | | | Bug: 32313927 Change-Id: Ib6e82b12ef45d2fe59e46b5b2dd8945047eeb981
* Create new DeviceProfile when in multi window mode.Jon Miranda2016-11-011-0/+14
| | | | | | | | | | | This is just a first pass to help make the codebase ready for MW mode. ie. won't see the effects of this unless resizeableActivity is set to true in the Android Manifest. Also allows long clicks from edge when in MW mode. Bug: 32176631 Change-Id: I48e5cb3bd15e70627d9bf007d93bc731612fba2e
* Removing unused background padding from base recycler viewSunny Goyal2016-10-181-1/+0
| | | | Change-Id: I36f68a143df8f3668074b3539aa9af170a91e511
* Updating the folder cell dimensions to be closer to a squareSunny Goyal2016-10-101-1/+2
|\ | | | | | | | | | | am: 68f240eb54 Change-Id: I68047a8eba8b3a0c8117fedbc45b6100dd04b023
| * Updating the folder cell dimensions to be closer to a squareSunny Goyal2016-10-071-1/+2
| | | | | | | | | | Bug: 31813976 Change-Id: I05d7520daee28a310ff122deaf265951e454d21e
* | Restore AllAppsContainerView UI to match spec.Jon Miranda2016-09-261-1/+1
|/ | | | | | Did some refactoring with Sunny's help. Change-Id: Ie4c90c316f1e381829836e11c83eaaedfed4d621
* Updating the paddings in folder cellSunny Goyal2016-09-161-14/+20
| | | | | | | | | > Updating overall padding for the cell and adding drawable padding > Ensuring that the folder cell is always rendered properly based on available vertical space Bug: 30605958 Change-Id: I8ceb9fea5a25052b0d7461f52edca0e6a33fa085
* Change all apps caret target bounding boxHyunyoung Song2016-09-071-1/+0
| | | | | | | | | | | | | | b/30400751 1) This also fixes the issue of apps drawer sliding up when page is swiped horizontally immediately above the hotseat area. 2) Disclaimer: this should be cp'ed to calgary. Hence, I tried to keep the diff small. Ideally, CaretDrawable animation handling should move to AllAppsHandleImageView via refactoring in follow up CL. Change-Id: I4d808ee2eeca53b40c0b4e4e0e364fef056e26c3
* Landscape container padding update.Hyunyoung Song2016-08-231-3/+3
| | | | | | b/30021487 Change-Id: I179825eba09f3c4c57175e8f6da49708dae1931c
* Fixing regression in folder positioning.Winson2016-07-231-1/+21
| | | | | | | | | | - When we had the search bar, the workspace padding always accounted for the search bar (and therefor drop target bar) height when the folder opened. Now that there is no padding on the top, we should offset the bar whenever possible to ensure that the drop target bar is visible. Bug: 30110595 Change-Id: Ia9a8581981c777f2507b6bd880994a3dcfd52c39