summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Matching hotseat to spec.Winson2016-07-201-11/+9
| | | | | | | | | - Fixing regression in hottest folder background getting clipped - Ensuring that the padding is correctly applied in vertical bar layout to match workspace Bug: 30021487 Change-Id: I09bce21829867f4bd4e50646e565959421e4984c
* Fixing small regressions from layout tweaksWinson2016-07-201-1/+1
| | | | | | | | | - Ensure that the caret is the right height - Ensure that the workspace page spacing matches the workspace padding, but just offscreen Bug: 30021487 Change-Id: Iaf4b33db0f6456b74986638fb6b6af78fc6e1859
* Initial changes to tweak layout.Winson2016-07-201-75/+121
| | | | | | | | | | | | | | | - Adding DeviceProfile callback for when the launcher layout changes due to insets. This is necessary since there are now different layouts depending on which side the navigation bar is on - Consolidating hotseat and other layout into the device profile launcher layout logic - Making the all apps icons match the workspace icon height - Tweaking caret drawable to draw to the bounds specified to simplify layout in each orientation - Fixing minor issue with page indicator shifting in landscape - Centering overview buttons to the workspace page Bug: 30021487 Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
* Moving the QSB out of the cell layout to the Drag layerSunny Goyal2016-07-131-8/+10
| | | | | | | | This allows better edge matching for the QSB. The QSB position is kept synchronized with the page scroll and all-apps transition. But its not visible in spring loaded and overview mode Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
* Adding support for non-zero left insetsSunny Goyal2016-07-071-20/+15
| | | | | Bug: 29613069 Change-Id: Ifdf9bcce7ecdedc510f3be8a4dc10eb8da7c4bf1
* Add caret shaped all app pull up handle to page indicator.Hyunyoung Song2016-06-151-6/+3
| | | | | | | | | b/28917826 > PageIndicator is also added in landscape > Touch delegate allows the active touch area to be 36dp Change-Id: If00f45fc88a13cd5a6759d771313439eb58561e3
* Removing the SearchDropTarget bar as it no longer contains the QSBSunny Goyal2016-06-061-123/+51
| | | | | | | | | | | | > Renaming it to simply DropTargetBar > Moving AppInfo to the top bar as well > The workspace pages will extend to the top edge (minus some padding). Since the QSB is no longer displayed on top of every page, there is no reason to reserve the space. > In spring-loaded mode, the workspace cell layout will scale enough to make room for the drop target bar at the top Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
* Add PageIndicator interface and custom PageIndicatorLine view.Tony Wickham2016-05-171-1/+0
| | | | | | | | | | | | | - The current PageIndicator has been renamed to PageIndicatorDots and PageIndicatorMarker has been renamed to PageIndicatorDot. - PageIndicatorDots and PageIndicatorLine implement PageIndicator. - PageIndicatorLine uses scroll progress and number of pages to draw a line of the correct size and position. - All of these page indicator files are now in a pageindicators package. Bug: 27227498 Change-Id: I9230d2e0600ce583989bd31d0b0e252b148d15c2
* Fixing wrong method nameSunny Goyal2016-04-041-1/+1
| | | | Change-Id: Idabe5d8ee41f31d30dcbe03aa626f7b39f713c14
* Adding an upper bound to all-apps width on larger devicesSunny Goyal2016-04-041-0/+15
| | | | Change-Id: I16a0d8fb7c5023045d0a6b9e8089e0ab6a476d6d
* Defining separate layouts for horizontal and vertical drop target barsSunny Goyal2016-03-241-25/+2
| | | | | | | instead of chaning the layouts in DeviceProfile Bug: 27721989 Change-Id: I9a22c21e643f4fd0058c9be5e9d705aaf7649204
* Switch all folder preview rendering to be programmatic (ie. no assets)Adam Cohen2016-03-031-0/+2
| | | | | | | | | | | | | | | -> Refactored the preview background rendering to be much more self-contained. This cleans up a lot of code in the CellLayout, and keeps the logic in the right place. -> We switch to software rendering for performance and compatibility reasons. -> Removed all assets. -> FolderIcon accept animation includes animation of the clipped region. -> 1:1 hand-off of drawing of the FolderIcon background between the FolderIcon and the CellLayout. Unfortunately, CellLayout rendering is still required to work around clipping issues (due to use of software layer). We also need this to support folder creation feedback. Change-Id: Ib8f7fa6359dfedff8145f38dd50ba03849ca0d51
* Merge "Setting content bounds in onMeasure as it uses measuredWidth, which ↵Sunny Goyal2016-02-171-1/+1
|\ | | | | | | | | | | | | | | | | might not be available during onCreate" into ub-launcher3-burnaby-polish am: 5df98da8fd * commit '5df98da8fd2c1997bd6c09a4772f018730345090': Setting content bounds in onMeasure as it uses measuredWidth, which might not be available during onCreate
| * Setting content bounds in onMeasure as it uses measuredWidth, which mightSunny Goyal2016-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | not be available during onCreate Also fixing the calculation of allApps column could, which was counting an additional icon gap Bug: 27173894 Change-Id: I8be8cccc76d7e7d945cf9383567a3026228b6c86
* | Refactor FolderIcon to separate the preview effect into it's own classAdam Cohen2016-02-121-1/+1
| | | | | | | | | | | | | | -> Created com.android.launcher3.folder package to house most folder-related files (aside from the FolderInfo) which is more related to the model than the UI. Change-Id: I767063e1e4c775c01a799a3bede30cd94ac48ade
* | Tweak spring-loaded workspace.Tony Wickham2016-02-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | - No page indicators in spring-loaded mode - Don’t move workspace up as high - Scale workspace at 90% instead of 80% on phones - Increase speed of workspace -> spring-loaded -> workspace - Widgets were being scaled down twice when dragging from widget picker - Don't scale up icons when dragging (scaling other stuff down is enough) - Make scrim less dark and panels more transparent - Thin white border around page instead of highlight when hovering Change-Id: I963e91c20d4c0340480d165e0f3b8064783c0cb2
* | resolve merge conflicts of b9759d399b to ub-launcher3-calgary.Tony Wickham2016-02-011-3/+14
|\| | | | | | | Change-Id: I66230c15e5eaeef316d4e2f14b85c6ff1b6e977d
| * Add extra space for the search bar.Tony Wickham2016-02-011-3/+14
| | | | | | | | | | | | Also fixed a broken test. Change-Id: I1c270e69617528ea30f0e26a2101673e9b9fa63c
* | resolve merge conflicts of a50a419b82 to ub-launcher3-master.Sunny Goyal2015-12-111-1/+1
|\| | | | | | | Change-Id: Ie0e233e22284b8ddd2dbb86204e042651b6dfae2
| * Restarting launcher when on font scale changeSunny Goyal2015-12-111-1/+1
| | | | | | | | | | | | | | | | | | Chaning the font scale affects the static device profile and may affect various background threads and static constants. Killing the process ensures that these states get invalidated properly. Bug: 26131935 Change-Id: Idc262ee5d158019e7a2505f8fb9a6413c06bfdeb
* | Merge "Fixing All apps not respecting scaled icon size" into ↵Sunny Goyal2015-12-101-3/+3
|\| | | | | | | | | | | | | | | | | ub-launcher3-burnaby-polish am: 49750ce75e * commit '49750ce75e7413ad3c4fe4be31a2e1d73312794b': Fixing All apps not respecting scaled icon size
| * Fixing All apps not respecting scaled icon sizeSunny Goyal2015-12-101-3/+3
| | | | | | | | Change-Id: I3d05c713939fd69d04f5896cdc5db91480b0d4d1
* | Revert "Revert "Reverting folder cell width on portrait phones.""Tony Wickham2015-11-131-1/+3
|\| | | | | | | | | | | | | am: 6159c242bc * commit '6159c242bc610f13e4c7550ae8b15f25603f4b23': Revert "Revert "Reverting folder cell width on portrait phones.""
| * Revert "Revert "Reverting folder cell width on portrait phones.""Tony Wickham2015-11-131-1/+3
| | | | | | | | | | | | This reverts commit 1974e98f5ec4713e50ba64ec32a7607c92ddce9b. Change-Id: I7c5d86de187989c085f676933ce3f1cbd57ed8a7
* | Revert "Reverting folder cell width on portrait phones."Tony Wickham2015-11-121-3/+1
|\| | | | | | | | | | | | | am: 1974e98f5e * commit '1974e98f5ec4713e50ba64ec32a7607c92ddce9b': Revert "Reverting folder cell width on portrait phones."
| * Revert "Reverting folder cell width on portrait phones."Tony Wickham2015-11-121-3/+1
| | | | | | | | | | | | This reverts commit b25e684a766362422f5693f7a2189910c1275584. Change-Id: Ie86adc4b35c73ab7ef78d73225b437adc4751172
* | Reverting folder cell width on portrait phones.Tony Wickham2015-11-121-1/+3
|\| | | | | | | | | | | | | am: b25e684a76 * commit 'b25e684a766362422f5693f7a2189910c1275584': Reverting folder cell width on portrait phones.