Commit Graph

159 Commits

Author SHA1 Message Date
Jon Miranda
846455e1ff Larger icons for L3Go and spacing changes.
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
2017-10-03 11:23:05 -07:00
TreeHugger Robot
bb28c01cf4 Merge "Fix bug where mw landscape cell size is calculated incorretly." into ub-launcher3-dorval-polish2 2017-08-30 19:17:07 +00:00
Jon Miranda
7fb9e712e8 Increase overview icon zone percentage from 20% to 22%.
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
2017-08-28 14:47:59 -07:00
Jon Miranda
a11380d370 Fix bug where mw landscape cell size is calculated incorretly.
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
2017-08-24 11:30:03 -07:00
Jon Miranda
5044c35b07 Update hotseat cell height calculation.
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
2017-08-09 11:37:59 -07:00
Jon Miranda
18751b649d Landscape launcher grid/all apps to spec.
* Moves FastScroller to the right.

Bug: 64160529
Change-Id: Ie0dfc0a2f0f2d6f6366e4f299769148d76017782
2017-08-01 16:56:38 -07:00
Jon Miranda
3f9bab2fe4 More launcher grid updates.
* 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
2017-07-28 14:50:17 -07:00
TreeHugger Robot
b35bb6021c Merge "Launcher grid changes." into ub-launcher3-dorval-polish 2017-07-26 23:59:59 +00:00
Jonathan Miranda
9ad87463a8 Revert "Update Folders to match spec."
This reverts commit fd8fa136f5.

Change-Id: Ifb8ce81e23f38df2eb2c26f93376eca19caae5b1
2017-07-26 11:05:29 -07:00
Jon Miranda
30d0aa2605 Launcher grid changes.
* Tighten up space on Workspace/All Apps for tall devices.
* Decrease the cell layout padding.

Bug: 63996463
Change-Id: Ifc89e4786b7033e2af77d3742006d8c9ee719081
2017-07-25 15:55:29 -07:00
Jon Miranda
1091e538b4 Manually compute all apps cell height in multi-window mode.
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
2017-07-24 10:45:36 -07:00
Jon Miranda
fd8fa136f5 Update Folders to match spec.
Bug: 63825895
Change-Id: Ia1a139f1afd944eefcd370645142227317e2bf20
2017-07-20 15:08:06 -07:00
Jon Miranda
8632d9dd1e Factor in CellLayout padding in cell size calculation.
Bug: 63753505
Change-Id: I221dfb1d486110f8de3994085d917c12f82bcd0f
2017-07-18 12:42:15 -07:00
Jon Miranda
4e358271d3 Tighten up vertical spacing in landscape all apps.
Bug: 37015359
Bug: 62801588
Change-Id: Ia4bdc2c2b12647cd671cf8a3e7a8defc43863da1
2017-07-14 15:55:07 -07:00
Jon Miranda
52ff325841 Move padding from Hotseat to Hotseat's CellLayout.
Bug: 63590728
Change-Id: I3ba6ba83b83897d75cc4445a7dab9c5b8b7b8ff1
2017-07-14 11:39:16 -07:00
Jon Miranda
2803200697 Set edgeMarginPx back to 8dp.
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
2017-07-13 18:40:48 -07:00
Jon Miranda
2ed276eb13 New calculation for page indicator size on tall devices.
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
2017-07-06 08:05:26 -07:00
Jon Miranda
72b5fd186e Grid change polish bugs.
- 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
2017-06-25 18:15:29 -07:00
Jon Miranda
b28c4fcf35 Landscape grid changes for Workspace/All Apps.
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
2017-06-23 11:47:48 -07:00
Jon Miranda
0966072c91 Portrait grid changes for Workspace/All Apps.
Bug: 37015359
Change-Id: Ifbdd0e71c36e532b189e02283e3eeb562ebe2654
2017-06-19 17:02:45 -07:00
Tony
47a8922161 Spread out overview buttons in landscape
Bug: 62574356
Change-Id: I7a959604bc57f8526ea827857da47d719746aba7
2017-06-16 18:33:31 -07:00
Sunny Goyal
966d901af0 Removing QsbBlockerView
> 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
2017-06-06 16:48:25 -07:00
Sunny Goyal
0dc1db4fee Aligning the search box with bottom of hotseat icons
Bug: 37616877
Change-Id: I153e754db8e6c96b47ab644e19ce110f56bf852e
2017-05-17 11:36:31 -07:00
Sunny Goyal
df39ca11d6 Removing padding override in multi-window mode
Bug: 37870754
Change-Id: Ia9fa51dccbd425874245bd312c0b0e087257fa81
2017-05-12 14:33:41 -07:00
Sunny Goyal
d519052281 Separating top and bottom paddings for the hotseat
Bug: 37616877
Change-Id: I2f187576c28d62f9bb8257c9b9295edb7a8e44c0
(cherry picked from commit 751e41eb66)
2017-04-26 06:00:21 +00:00
Tony Wickham
1237df0a7c Update icon badges to match spec
- 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
2017-04-25 12:55:02 -07:00
Louis Begin
b07a355fe2 Add checks for FeatureFlags.QSB_ON_FIRST_SCREEN
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
2017-03-08 16:10:46 -08:00
Tony Wickham
a799bed803 Show notification icon in place of "1" in badge.
- 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
2017-02-07 09:48:43 -08:00
Tony Wickham
9a8d11f930 FastBitmapDrawable can draw an icon badge (notification count)
- 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
2017-01-13 10:58:10 -08:00
Sunny Goyal
f5440cbd6c Removing FeatureFlag.LAUNCHER3_LEGACY_WORKSPACE_DND and corresponding logic
Change-Id: Ie10c087b4f72ee27be5bf12e2c81be5b7a3a6176
2016-12-15 08:05:09 -08:00
Jon Miranda
c1b2399540 Scale folders to fit within the available height and width.
* 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
2016-12-13 11:09:13 -08:00
Sunny Goyal
776ca257ce Merge "Defining various modes for CellLayout: Workspace, Hotseat & Folder" into ub-launcher3-master 2016-12-12 20:45:17 +00:00
Jon Miranda
7ae64ffbe1 Scale widgets in multi-window mode.
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
2016-11-23 10:32:42 -08:00
Sunny Goyal
c13403c612 Defining various modes for CellLayout: Workspace, Hotseat & Folder
> Moving the definition of modes to xml
> Defining attributes in xml

Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
2016-11-21 15:20:16 +05:30
Jon Miranda
c1b08c5b7f Add bottom padding to hotseat in multi-window mode.
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
2016-11-15 14:37:56 -08:00
Jon Miranda
93e1f04fa9 Hide workspace text in multi-window mode.
* Vertically centers workspace icons.
* New iconDisplay value so shortcut text is not overriden.

Bug: 32176631

Change-Id: I86753bab5b24aafc417e0f77d8c471fc4c0dc7f0
2016-11-15 11:19:03 -08:00
Jon Miranda
51f037d674 Refactor edge of screen detection code.
There were two resources that both defined the edge of the screen.

Change-Id: I82ab553cc3123ef54ff1f0c692d29f3678ad04ac
2016-11-07 10:11:49 -08:00
Jon Miranda
bf7d8121ea Scale down folder cells to fit within bounds if necessary.
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
2016-11-04 14:15:33 -07:00
Jon Miranda
c3e4e228b1 Remove unused code in DeviceProfile.
Change-Id: I463302e6711ad39241257b8dff058d9f3e99d883
2016-11-02 16:56:52 -07:00
Jon Miranda
df3bc52ca9 Center overview panel buttons.
Bug: 32313927
Change-Id: Ib6e82b12ef45d2fe59e46b5b2dd8945047eeb981
2016-11-02 13:39:46 -07:00
Jon Miranda
cc42c5bd10 Create new DeviceProfile when in multi window mode.
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
2016-11-01 09:00:20 -07:00
Sunny Goyal
00e106880d Removing unused background padding from base recycler view
Change-Id: I36f68a143df8f3668074b3539aa9af170a91e511
2016-10-18 21:36:29 +01:00
Sunny Goyal
802f3255a7 Updating the folder cell dimensions to be closer to a square
am: 68f240eb54

Change-Id: I68047a8eba8b3a0c8117fedbc45b6100dd04b023
2016-10-10 21:17:28 +00:00
Sunny Goyal
68f240eb54 Updating the folder cell dimensions to be closer to a square
Bug: 31813976
Change-Id: I05d7520daee28a310ff122deaf265951e454d21e
2016-10-07 13:36:56 -07:00
Jon Miranda
aca2145f2a Restore AllAppsContainerView UI to match spec.
Did some refactoring with Sunny's help.

Change-Id: Ie4c90c316f1e381829836e11c83eaaedfed4d621
2016-09-26 16:45:10 -07:00
Sunny Goyal
baec6ffae2 Updating the paddings in folder cell
> 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
2016-09-16 12:05:02 -07:00
Hyunyoung Song
016eaeea99 Change all apps caret target bounding box
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
2016-09-07 14:45:09 -07:00
Hyunyoung Song
9d96fd5790 Landscape container padding update.
b/30021487

Change-Id: I179825eba09f3c4c57175e8f6da49708dae1931c
2016-08-23 11:06:24 -07:00
Winson
fadbe8ffbd Fixing regression in folder positioning.
- 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
2016-07-23 01:15:08 +00:00
Winson
6231ede10c Matching hotseat to spec.
- 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
2016-07-20 17:21:55 -07:00