Commit Graph

212 Commits

Author SHA1 Message Date
Samuel Fufa
1c3c3b1d6f Show all apps app names in multi window landscape
Bug: 145019195
Test: Manual
Change-Id: I14af825e3d23a54de54d22625bfd427563269211
2020-02-09 13:16:30 -08:00
Sunny Goyal
9c2b96090b Adding SecondaryDisplayLauncher in Launcher using common listener
Bug: 141596722
Change-Id: I480bfadf592f7d0309f17c33a3fe14bb77fb5586
2020-01-30 08:27:27 +00:00
Samuel Fufa
1c8d90aed0 Fix folder available height calculation
Bug: 139456471
Test: Manual
Change-Id: Ic86c481e76f8b6629ad74109ef98900f1c00e16c
2019-11-14 11:02:49 -08:00
Jon Miranda
64d7481597 Have consistent All Apps UI between grid size changes.
We build an IDP with no grid size override values. This
allows us to reference the profile measurements so that we can have a
consistent UI for areas that the grid size change should not affect.

Bug: 124967099
Change-Id: I6235862c95800d8f31dbf2de1d12b1fcf4dbd850
2019-10-16 11:21:36 -07:00
Samuel Fufa
f1424a3b38 Decouple grid size and widget preview size in WidgetsRecyclerView
Test: Manual
Bug:142148773
Change-Id: I59aa29e95ddb7d6002a88cf853bae5fcf9811154
2019-10-04 15:15:58 -07:00
Samuel Fufa
c96fa247a3 Fix notification dot scale in AllApps with grid size enabled
Test: Manual
Bug: 141262820
Change-Id: I24abf822edaeeabf335ed698a3ac1a65b71be7dc
2019-09-27 14:49:54 -07:00
Jon Miranda
6f7e9702e3 Support defining X column layout for all apps as a display option.
Bug: 124967099
Change-Id: I7bf576759b3fa4f6ca617fbbd660541c12fd09ac
2019-09-16 16:24:59 -07:00
Winson Chung
13c1c2cd65 Migrate to using DefaultDisplay
- Remove extra binder calls to get the default display

Bug: 140633033
Change-Id: I532645deac101a6065d90484b87a67b67aa717f5
2019-09-09 10:21:28 -07:00
Zak Cohen
f3231f417d Remove unused hints code.
This layout is handled by the provider of the hints now.

Test: manual
Change-Id: Ifc0db2395a7503b1b03dcb796961ef6647c0413b
2019-06-03 14:58:18 -07:00
Jon Miranda
3f411e7ae4 Add padding between nav bar and hotseat in vertical bar layout.
- Set to match the workspace padding on the opposite side of the
  screen.

Bug: 130521490
Change-Id: I26fd71bb146c56a647397a040dbbac9d1556c3fe
2019-05-16 17:16:21 -07:00
vadimt
1b383af652 Not using magic constants for navbar height
Change-Id: I6783b8a2ebb059ce35748d8c3e818cbe732ff40d
2019-05-08 17:20:34 -07:00
Tony Wickham
e1cb93f957 Always place notification dots directly on adaptive icon path
- Calculate point on icon path nearest to top right corner, and
  use that as center for the dot
- Cleanup code related to dot offset

Test:
Set each style (different icon shape) and verify dot is in correct
placement for each of:
- Folders
- Icons in folders
- Icons in all apps
- Icons on workspace

Bug: 124414511
Change-Id: I036ed3677e8af222f00d4fad4a36a7e4d9b49ad9
2019-05-06 10:42:55 -07:00
Sunny Goyal
ae6e318711 Initial changes to creating a fake landscape Launcher UI
Workspace and hotseat are drawn in rotated UI giving the impression that the
device is in Portrait, even though it is in landscape

Bug: 131360075
Change-Id: I29c4068af25fd4dcf7039b9a45886e864a137977
2019-05-02 10:59:28 -07:00
Jon Miranda
bba6451b5f Refactor app open animation so that FloatingIconView tracks window.
Before, the window used to track the FloatingIconView. With this refactor,
both app open and app close use the same update method.

With the refactor, we can now use adaptive icons to morph the icon into the
size of the window.

Movement/interpolators are still the same as the original except for the
alpha and the clip animation. To ensure a perfect tradeoff, we wait for the
icon to match the size and shape of the window before crossfading.
Currently it is set up so that the tradeoff happens when the animation is
15% done, but this can be tuned later.

Bug: 122843905

Change-Id: I7d3edbefffb15fe26958a62ab33cf23dc1203908
2019-04-01 13:19:28 -07:00
Sunny Goyal
58fa4b66ea Removing some redundant resource definitions
Change-Id: I68ae602116e6eb334dfce2a013fcc42068c464bf
2019-03-22 16:24:16 -07:00
Jon Miranda
0bd63d11e8 Add landscape support for DeviceProfile#getItemLocation.
Also updated to use better estimates for portrait.

Bug: 123900446
Change-Id: I39d9ccec9a936bc0b5800ae77e7f88c4cfec1372
2019-03-11 11:50:07 -07:00
Jon Miranda
1a49fb5733 Transform closing window to icon on workspace using adaptive icons.
With adaptive icons, we can have FloatingIconView match the shape
and size of the closing window, regardless of the icon shape.

FloatingIconView starts off as a rounded rect (same corners as task view)
and then morphs into the icon shape using FolderShape#createRevealAnimator
in reverse.

Decided to add FeatureFlag.ADAPTIVE_ICON_WINDOW_ANIM since there are still
some issues with folders, badges, and a visible jump when swapping the
FloatingIconView with the original icon.

Bug: 123900446

Change-Id: I94969eea6d5f4b932a84a11eb403611276042b46
2019-03-01 12:48:25 -08:00
Sunny Goyal
238124eb17 Ensure that icon and cached display size is always non-zero
Bug: 119290867
Change-Id: If9309df2f62f707b7ebd0c5808d4d872f6d63c61
2019-02-22 22:22:03 +00:00
Miranda Kephart
1a359a261d Add hints in Overview
If the ENABLE_HINTS_IN_OVERVIEW flag is enabled, pulls chip hint
data (currently from the NavBarHint plugin; eventually from AiAi)
and shows the chips between the task view screenshot and the QSB.

Screenshot: https://screenshot.googleplex.com/Ww05W13XjBv

BUG:124390101

Change-Id: I7686673b705257eca31f2fa40e2744e197153c7c
2019-02-20 15:17:03 -05:00
Jon Miranda
0128d3f6e0 App to home animation zooms into the app icon.
- Created FloatingIconView which is now used by both the app close and
  app open animation.
- getItemLocation in DeviceProfile is used to get an item's final location
  since getLocationOnScreen may return a View's location mid-animation.
- Added getFirstMatchForAppClose which is optimized to return for best
  visual animation.
- Also fixes app open RTL bug.
- Next CL will use AdaptiveIcons and FolderShape reveal animator to match
  the app icon to the app window.

Bug: 123900446
Bug: 123541334
Change-Id: Ief75f63fc5141c1ee59d4773946d08794846cb31
2019-02-14 16:54:45 -08:00
Sunny Goyal
415f173331 Changing the format for device profile definition
Device profiles are defined such that the grid size is fixed
and only the icon and text sizes change. For every grid size option
there are multiple display configurations.

Bug: 118758696
Change-Id: I54aac9106c576324b02530913c447e849b4ae1da
2018-12-07 00:06:25 -08:00
Tony Wickham
f34bee819c Rename "badges" to "dots" where appropriate
This will reduce confusion with the other "badging" concept we use for,
e.g. work profiles. It is also consistent with the external name
"notification dots".

Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
2018-12-04 10:46:40 -08:00
Tony Wickham
8912b04c80 Move BadgeRenderer to iconloader library
- Rename BadgeRenderer to DotRenderer
- Move drawing parameters to new class DrawParams
- Add leftAlign param
Change-Id: I69de56c13280ba5e7e1ea3868c23edfac01012e9
2018-11-30 16:28:56 -08:00
Hyunyoung Song
48cb7bc7a4 Move IconNormalizer/ShadowGenerator/LauncherIcons to icons package
Bug: 115891474

Sending out the package name changing CL first before I make
LauncherIconsHandler and tests around it.

Change-Id: Ic10479a06333e1435b392a7072cd08782e710cbd
2018-09-26 11:57:37 -07:00
Jon Miranda
1786df36c2 Fix bug where folder items get clipped.
We need to account for both sides in the folder margin calculation.
eg. in MW mode with display set to Largest, the folder can reach both edges

Bug: 115955939
Change-Id: I145c8c1c2a75891eb3386284f06fc98800fe5ce9
2018-09-25 13:05:23 -07:00
Jon Miranda
5eacbb7fc1 Update launcher grid for tablet devices.
* Number of hotseat icons matches number of workspace columns.
* Evenly space out the workspace icons.

Bug: 111617973
Change-Id: Ia80e6354c8d449f2a397db5fd432cebc9f23027f
2018-07-31 11:15:01 -07:00
Jon Miranda
7e183c3976 Tune device profiles.
* Extend page indicator so that its centered within the gap between
  the workspace items and hotseat.
* Decrease the amount of extra space we allot to the hotseat.
* Add the extra space to the hotseat bottom padding so that the hotseat icons
  are aligned to the top of the hotseat.

Bug: 78589630
Change-Id: I78c619a757d9d248874216e93376ad4ba18c8e50
2018-06-20 16:43:19 -07:00
Tony Wickham
1eeffbee01 Add padding between hotseat and insets in multiwindow landscape
Right now there's almost no room between the hotseat icons and the
nav  bar in this mode, and it looks kind of bad. It also causes
b/109946631 which is fixed by this change.

Also fix placement of popup in RTL landscape (was incorrectly inset)

Bug: 109946631
Change-Id: I324485da0048b907776b16b719b631c5314e5696
2018-06-13 12:37:47 -07:00
Sunny Goyal
08ef66789b Using dragHandle for workspace padding calculation instead of pageIndicator
> PageIndicator is a 1dp indicator which does not contribute in any padding calculations

Bug: 79111591
Change-Id: I4d8be0149da2b3f14593ae71ca037ffe3885d9be
2018-05-10 11:33:11 -07:00
Sunny Goyal
59d086c3ce Using surface rotation instead of insets to determine seascape configuration
Insets may not correctly indicate seascape configuration in multi-window or
when the presence of device-cutouts

Bug: 79376298
Change-Id: I8268efca0001fe527a0ffefe48cc71e774fad01c
2018-05-07 17:32:46 -07:00
Sunny Goyal
d792a77234 Updating the card size logic
In full screen always follow the device aspect ratio
In multi-window, follow the 1:1 split window size
Rotate the screen shot only in full-screen mode

Bug: 70289009
Change-Id: Id5095565634d4d7920fefa929b28276db80bda5f
2018-04-06 11:29:32 -07:00
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