Commit Graph

81 Commits

Author SHA1 Message Date
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
e598699dc5 Remove custom focus logic
Using the system logic for focus handling so that partially visible contents are
properly handled, eg in overview only hotseat is visible
This does changes the focus logic on workspace when both icons and widgets or different sizes
are present, we may consider reviving (parts of) this logic in the future

Bug: 80189843
Change-Id: I874e284e0a62b579c24d36db9b74da3de7a7e367
2018-05-23 10:54:18 -07:00
Sunny Goyal
11e9649894 Do not clear grid accupancy if nothing changes
Hotseat is calling setGridSize on every layout which was clearing gridOccupancy, marking the cells as empty

Bug: 73867732
Change-Id: Ie07f5786f2e5bfe2340fd0b8723964f651c929d4
2018-03-26 16:19:41 -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
f8d56fc8a1 Initial changes for handling configuration changes dynamically
Bug: 71709920
Change-Id: I88cf2229dea28d01c13a5a76d2290e91b07d095e
2018-01-31 15:20:30 -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
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
e969c68c7e Removing horizontal bar from page indicator
> Removing the clickable bar from pageIndicator in portrait view
> Moving onClick logic to respective classes

Change-Id: I83a8df90d8c5442890bc09fdda17a82b9d134b8a
2017-12-05 16:57:48 -08:00
Sunny Goyal
f2dd4216c1 Removing extraction service and palette api dependency
Change-Id: I30ad1a1462a97b6bc03f8e386ae3058c7fe022e5
2017-09-29 10:40:08 -07:00
Hyunyoung Song
d315ff2bc2 Remove haptic on touch down
Bug: 65463659

Change-Id: I111d18a3d1dcd7877ad4aa5baaeca2e6810be332
2017-09-12 15:54:50 -07:00
Sunny Goyal
5606e07059 Removing long press support from page-indicator
Bug: 62445549
Bug: 38163974
Change-Id: Ic0ae44ded7e4755c5401f327ce0d98a9ea96b2ab
2017-06-15 14:25:12 -07:00
Mario Bertschler
48198d004a All Apps transition with gradient and scrim.
The transition is behind a feature flag and
turned off by default.

Change-Id: I155840ba82b5a573d874376797db5f739a52d706
2017-05-03 10:32:57 -07:00
Sunny Goyal
5e7b238a93 Updating color extraction to include wallpaper theme color.
Also adding mathods and callbacks to pass the related data to the callbacks.

Bug: 37616877
Change-Id: I7512cac7a603e8e5a05ec3a360c9eec493344b00
2017-04-26 08:42:05 -07:00
Sunny Goyal
1f3f07d47c Simplifying some launcher themes
> Replacing some colors with theme attributes
> Simplifying styles definition by removing unnecessary inheritance and inlining some definitions

Change-Id: Ifa167515cae6a7fd3720f1a52ff9ce11abb4495f
2017-02-16 15:24:37 -08:00
Sunny Goyal
6c46a6d324 Using java_style enum generation for proto
This makes it easier to track various method parameters and simplifies
debug logging

Change-Id: Ib7c3d52590d0c36b2c8460c889ee3bead3454569
2016-12-15 09:30:35 -08:00
Tony Wickham
cf160d392a Merge "Allow long-press on workspace immediately after dropping." into ub-launcher3-master 2016-12-12 21:03:24 +00:00
Tony Wickham
0c7852f822 Allow long-press on workspace immediately after dropping.
Previously the touch was consumed until the transition from
spring-loaded to normal workspace finished, leading long
presses to trigger on the background rather than on apps.
This made it difficult to move multiple icons consecutively.

Bug: 29631912
Change-Id: I259e618c81f56bc40d08a5d63ddbbf3c82a76baf
2016-12-12 12:51:27 -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
Sunny Goyal
55cb70bf70 Adding an overridable DrawableFactory to allow creating custom icon drawables
> Adding ItemInfo as a parameter for creating drawable

Change-Id: I793acb0381d2b8df4db0a08317dddf1464788ebc
2016-12-07 15:55:47 -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
Tony Wickham
6982de2485 resolve merge conflicts of 2fd0208 to ub-launcher3-master
Change-Id: I20ad6eaace81786be080e28d6eb551908add6d90
2016-10-12 14:38:43 -07:00
Tony
2fd0208605 Use Launcher.getLauncher(Context) instead of type-casting.
Bug: 32010039
Change-Id: Icb80d3e547a706740b84df2cb80f99e4a7f81c43
2016-10-07 12:50:01 -07:00
Hyunyoung Song
df7ef68bbf Refactors in UserEventDispatcher
- LaunchSource -> LogContainer

Change-Id: I71bfee992fb1ba7ae80e824d419f7bf8d3020999
2016-10-06 17:52:22 -07:00
Jon Miranda
488d8adeb8 Use ContextCompat.getColor to support API levels below 23.
Found while debugging on Lollipop.

Change-Id: Ibe97fd30c4ee8cd0c1735a41802b859345f9e931
2016-09-15 15:05:12 -07:00
Tony Wickham
5f2ea1e9ce Cancel hotseat color animator before setting a new color.
am: ef0c537925

Change-Id: I1aea3e288d7e54e788ad95b8599e6d909458b220
2016-08-22 23:23:09 +00:00
Tony Wickham
ef0c537925 Cancel hotseat color animator before setting a new color.
There was a race condition that caused the new color to not be
applied. For example, here's how the hotseat would become transparent:
1 Launcher is loaded for the first time; as such, there is not yet a
  color defined for the hotseat, so we start animating to the provided
  default (Color.TRANSPARENT). Meanwhile we start the color extraction.
2 When the color extraction finishes, we set the hotseat to the new
  color. However, if launcher is paused at the time (perhaps some
  retail mode content is showing), then we don't animate the change.
3 If 2 happens before the animation in 1 is complete, the color from
  2 will be overriden by subsequent animation frames and thus the
  hotseat remains transparent until the wallpaper changes.

Bug: 30956221
Change-Id: Iddf72379b0162f1b32883ad26ce267473e172849
2016-08-22 15:23:01 -07:00
Sunny Goyal
4583d09c05 Fixing broken accessibility drag
> Allow touch events on hotseat while in accessible drag as drag now
happens in spring loaded state.
> Allow drop target buttons to ignore thershold check when in
accessibility drag

Bug: 30900444
Change-Id: I88274367983fc027b2ddde3a719ca943f4f48587
2016-08-17 11:24:10 -07:00
Hyunyoung Song
5a17fe6ca0 [DO NOT MERGE] Set launch source target correctly for user event logging
Before, everything is set to APP_ICON
With this changed, pinned shortcuts are set to DEEPSHORTCUT

Change-Id: I3e17de63f58693525236290ef5cb1f909f1d6098
(cherry picked from commit 8ce6063c4a)
2016-08-16 00:40:26 +00:00
Hyunyoung Song
8ce6063c4a Set launch source target correctly for user event logging
Before, everything is set to APP_ICON
With this changed, pinned shortcuts are set to DEEPSHORTCUT

Change-Id: I3e17de63f58693525236290ef5cb1f909f1d6098
2016-08-15 16:22:20 -07:00
Winson
1f06427266 Initial changes to tweak layout.
- 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
2016-07-20 10:17:08 -07:00
Hyunyoung Song
e4be3b3fdb Support gray hotseat background in all apps transition
b/30201515

Change-Id: Ie4b8442ac804b4df94e9673608129e6ffc0c3360
2016-07-18 16:35:10 -07:00
Hyunyoung Song
45eb757ea7 Remove relayouts
b/29945805

> Workspace relayout occurs when window flag is set to
change the status bar. This should not cause AllAppsTransitionController
to be initialized.
> Setting/Unsetting background drawables on the hotseat
also causes unnecessary layout. Fix this issue.

Change-Id: I73a3bfd3eb4bc34cf6760ffbd9826e3fef867056
2016-07-01 18:04:07 -07:00
Hyunyoung Song
f7e5e374fe Prevent all apps transition NPE
b/29643291
b/29642263

> Also do not change status bar when landscape mode

Change-Id: I1e44af8e031856a50a7413ad297c437245e8b2aa
2016-06-28 12:27:41 -07:00
Hyunyoung Song
a0c5647f52 Fixing a crash on APPS->WORKSPACE transition when animation is automated without dragging.
b/29424335

Change-Id: I2b109423b5a4cfc94fcda75fdea936785373968f
2016-06-20 13:54:42 -07:00
Sunny Goyal
bb011dad4e Adding a flag (enabled by default) to remove the all-apps button.
All apps can still be opened by clicking the caret.

Bug: 29398447
Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
2016-06-17 08:17:22 -07:00
Tony Wickham
462b5cca7b Extract color for the hotseat.
- Only considers the bottom fourth of the wallpaper
- Is translucent black or white depending on how dark/light
  the wallpaper is
- Hotseat extends behind the nav bar

Bug: 27230217
Change-Id: Id4ea6ee91b4dd221b4c277d22d5041cab178801d
2016-05-09 15:41:38 -07:00
Hyunyoung Song
aa95365427 Refactor UserEventDispatcher (1/2)
b/28269657

Change-Id: I1083e6f73f42ac1986428a39c6b532050e595ac6
2016-04-19 18:30:24 -07:00
Hyunyoung Song
ddec1c739e Refactor UserEventLogging, Add predictedRank, replace Bundle with Proto
b/26494415
- Removed bundle object that became redundant now that we have LauncherEvent proto
- Combined Stats and UserEventLogger as they are effectively doing same thing
- Removed parent field inside Target
- added predictedRank target inside Target

b/27967359
- make com.android.launcher3.action.LAUNCH broadcast explicit
Later CL: finish packageName/intent/componentHash/predictedRank fields

Change-Id: I441fb46c834f73e58a4d2324e8da7971e8713ec8
2016-04-13 10:58:33 -07:00
Tony Wickham
95cdb3a021 Remove scrim on highlighted spring-loaded panel.
Bug: 27135377
Change-Id: I470955ed082a45ae7dc5f8fdd1f3decb2b573dbc
2016-03-16 11:09:09 -07:00
Sunny Goyal
4ffec48dec Making some view properties exported.
These will be visible in hierarchy viewer

Change-Id: I940724a7f61d67b8502d77be203a94875bc92668
2016-02-09 11:29:34 -08:00
Tony Wickham
6cbd22279e Add special column for All Apps button in FocusLogic's sparse matrix.
The All Apps button creates a number of edge cases, mainly because it
causes the hotseat to sometimes have an extra column than the workspace.
Previously, we sort of swept these problems under the rug by simply
ignoring the All Apps button if other icons were present in the hotseat,
with the assumption that those other icons should get focus instead of
the All Apps button. (If possible, we want to stay in the same column
when moving from the workspace to the hotseat.) But this doesn't always
work, as in the attached bug where the hotseat doesn't get focus at all
when the All Apps button is an obvious candidate for it.

By adding a specialized column in the focus matrix for the All Apps
button, we ensure that moving down to the hotseat stays within the
original column when possible, while also allowing the focus to switch
to the All Apps button if appropriate. Furthermore, we take care to skip
over the All Apps column when necessary in order to maintain all
previous functionality.

Bug: 25590522
Change-Id: I5d6a8ee69de8834314c4689246fe7d54329b2eef
2015-11-10 11:40:58 -08:00
Winson
a49b1f75cd Fix issue with source params not reporting predicted apps.
Bug: 25020080
Change-Id: Iaa67ccbb3e3a6c264aaa4fa3c915faad8a69bbbc
2015-10-16 14:57:24 -07:00
Tony Wickham
d6b4037b09 Grid adjustments, specifically for Ryu.
> Less than 14% of the screen is used for left/right workspace padding.
  (To be clear, this means 7% for the left and 7% for the right.)
> Hotseat icons are the same size as workspace icons.
> Far left and right hotseat edges line up with workspace edges.
> All Apps button is scaled down 8dp.

Bug: 24003478

Change-Id: Idb057ab0f6ba29e7fd93feac7573ca2e07c7e839
2015-10-08 09:23:10 -07:00
Winson Chung
76648c58d5 Making long-press of AllApps to jump directly to search.
Bug: 22210146
Change-Id: Iacf28416d6e31233a68e3b41576a8860b4b72b88
2015-07-10 16:08:56 -07:00
Sunny Goyal
4f3e9383eb Code cleanup
> Removing obsolete logging
> Removing unused methods
> Removing resource leak warning due to non-static handler class in launcher

Change-Id: Ic38cc8aea82899b0b5ee3235f04e5964e49245fb
2015-06-05 00:34:06 -07:00
Sunny Goyal
53d7ee4285 Fixing different bitmap sizes in different orientations
> Using a single bitmap icon size
> Picking up appropriate density for satisfy the required icon size
> Fixing some icon size assumptions during icon animations

Bug: 19514688
Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
2015-06-03 19:07:44 -07:00
Winson Chung
8f1eff7b6c Adding context for app launches.
Bug: 21492784
Change-Id: I1b28ac8f44498e1d9770e770b074f19c721c3f10
2015-06-02 16:58:30 -07:00