Commit Graph

181 Commits

Author SHA1 Message Date
Jon Miranda
591e360803 Match folder icon size to normalized circle icon size.
Simplifies the logic for calculating the folder icon size,
and ensures consistent sizing in different launcher viewing modes.

Bug: 74078689
Change-Id: I5cf4474fd81e55aa50b056418c95533801f07d48
2018-03-28 12:46:48 -07:00
Sunny Goyal
81b4c7bb3c Adding a custom view for DragHandle
> Separating page indicator and drag handle
> Page indicator always draws irrespactive of oriantation
> Drag handle is responsible for accessibility interactions
> Adding assissibility actions for DragHandle

Bug: 72500733
Change-Id: I9030337456964af1bdf77f1c01956452321f9229
2018-03-26 15:52:03 -07:00
Sunny Goyal
7c7be8c20a Simplifying options popup and overview handling
> Removing support for page drag-n-drop from pagedView
> Removing Overview UI from Launcher3 without quickstep and using options popup instead
> Removing touch handlers from CellLayouts and showing options popup based on workspace long press
> Excluding touch outside inset when showing the popup

Bug: 74136505
Change-Id: I34c2a7ff58452db26f5d1a85d554be40fc75f2b8
2018-03-13 12:57:32 -07:00
Sunny Goyal
2e2e2b4a63 Fixing widget label not being rendered in multi-window mode
Bug: 73709754
Change-Id: Id6342e3412c2b247e052bc45c01a484422a7c011
2018-02-28 17:34:23 -08:00
Sunny Goyal
d70e75a514 Removing launcher dependency when logging quickstep interaction
as Launcher may not be ready when the touch gesture completes.

Change-Id: Ia69eb7bfb0340f7b7ce9b6c67be8851e5429f867
2018-02-22 10:21:41 -08:00
Winson Chung
2fda6ced2a Handle transition from multi-window
- Make use of app/home insets and minimized home size to calculate the
  proper clipping and target bounds for the task view in home.

Test: Swipe up when in multiwindow

Change-Id: Ibef7a6dc319ded7867ee559dd31c5e87fd76cadb
2018-02-07 14:56:24 -08:00
Sunny Goyal
fde5505d02 Handling configuration changes
> Adding a listener for device profile changes
> Updating various controllers instead of recreating them
> Clearing all-apps icon

Bug: 71709920
Change-Id: Ief7db199eb7494ebd8fb433198f333cd2e8e661d
2018-02-01 14:47:08 -08:00
Sunny Goyal
7e2e67fd47 Adding isSeascape method to have a common place to orientation check
Change-Id: Ia61792b29ab0d1d74f76a8dfa53bbf968874dfaa
2018-01-26 13:47:32 -08:00
Sunny Goyal
12069e6cbf Removing some device profile dependencies in view contructors
Bug: 71709920
Change-Id: I13e33dceaeff71e3fb7bbb93f24be69c17d6da96
2018-01-16 14:17:47 -08:00
Tony Wickham
b4b7e20ebc Bound folders to overview panel instead of workspace
Since the workspace is scaled down in overview, the folders
were moving too far from the hotseat.

Change-Id: I3e8810f918436fec3a646abda9c147b688cb803b
2018-01-12 17:59:25 -08:00
Sunny Goyal
1a52ef57c7 Removing some dependency on Launcher UI
Change-Id: Ic1c84880cfe4daa9398b8eb27c3afc0837c5a8ca
2018-01-11 15:33:23 -08:00
Sunny Goyal
07b6929cd9 Removing layout handling in DeviceProfile and moving it to
individual views

Bug: 71709920
Change-Id: I8300fa7a84b31898bdb135d774cca576d2928525
2018-01-10 15:13:25 -08:00
Sunny Goyal
228153d92a Updating landscape layout for launcher/quickstep
> Hotseat is tied to navbar (on left in seascape)
> Search box shows up in Overview (clicking it would crash for now)
> All-apps is no longer fullscreen in landscape
> Recents cards are appropriately scaled down
> Hotseat is visible in Overview

Bug: 70179916
Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
2018-01-08 13:53:44 -08:00
Sunny Goyal
179249d804 Dominant color is part of icon cache
> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
2018-01-03 16:55:58 -08:00
Sunny Goyal
b532dfe45d Updating the hotseat background to a solid color with rounded corners
Change-Id: I297920518f925e122f2e9f55a68228b96b42ea27
2017-12-14 11:43:48 -08:00
Mario Bertschler
ac9408a5cd Enable work profile tab in all apps.
This CL will bring two tabs to all apps: Personal and Work,
currently only if the user has a workfile set up and
behind a feature flag defaulting to disabled.

Bug: 68713881

Change-Id: Ib5a558281ef3593359db3ad593ee1d0cf279f547
2017-11-14 10:28:54 -08:00
Winson Chung
b63b44c3d5 Load some recent tasks
Bug: 69166452
Test: Build quickstep
Change-Id: Id4b0172256d6920616a6b9529d61abd1fe0c1a36
2017-11-13 18:02:44 -08:00
Sunny Goyal
16764588c9 Separing the overview states for normal and quickstep builds
In QuickStep, adding a placeholder ScrollView and changing the state logic
appropriately to handle that

Change-Id: I10223c0692788d6e5dbf8c408c01cafb4e39bd2c
2017-11-07 09:46:20 -08:00
Sunny Goyal
c99cb174c3 Moving some state specific logic to subclass of LauncherState
Bug: 67678570
Change-Id: I1316f91c9f19bd572e4a0da67a22fa8921e1dcf9
2017-10-20 13:56:47 -07:00
Android Build Merger (Role)
8c23068b7c [automerger] Larger icons for L3Go and spacing changes. am: 846455e1ff
Change-Id: Iec2b04651788abaa3abb8a1b295a7f5eb1f92355
2017-10-03 18:27:55 +00:00
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
Jon Miranda
0cd04571d2 Change rule so that multi-window labels are shown if there is space.
ie. Taimen has enough room to show the labels in mw mode.

Bug: 65778773
Change-Id: If585f3f975b44d17ea6e07f23c50758998bbb564
2017-09-19 11:31:42 -07:00
TreeHugger Robot
c32d5abe60 Merge changes from topic "am-b4842062-1b80-4730-9ee4-8ba12a75cc30" into ub-launcher3-master
* changes:
  [automerger] Fix bug where mw landscape cell size is calculated incorretly. am: a11380d370
  Fix bug where mw landscape cell size is calculated incorretly.
2017-08-30 19:17:07 +00: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