Commit Graph

170 Commits

Author SHA1 Message Date
Jon Miranda
6a85817dfc Don't add focusables when getDescendantFocusability is FOCUS_BLOCK_DESCENDANTS.
Bug: 32315286
Change-Id: I6fc6600fc9cbf83f720d9e6e878735076cd52cf1
2016-10-27 14:14:31 -07:00
Sunny Goyal
9ccafbff26 Removing custom dispatchDraw logic and letting the system handle
selecting appropriate children for drawing.

> System already skips children which are outside the bounds. Originally
this logic was added because workspace layout is larger than the screen, and
we need to selectivly skip more children. But over time we have added many
special conditions and at present workspace actually draws more children than
needed at any given time.
> Fixing bug, where onBeginPageMoving was getting called during folder open

Bug: 12116740
Change-Id: Idee18ee9cd9d348ebc4dfd82f4ff6df14e0d22d2
2016-10-26 17:14:12 -07:00
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
0de011705b Code sanitization
- Removed bad method/class name typos

Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
2016-10-06 10:57:29 -07:00
Sunny Goyal
fe770c9feb Cleaning up restore instance state logic
Restore instance state is only used for first binding. But in case of restore,
the binding happens synchronously, so there is not need to store the bundle
in a global variable

Change-Id: Ibc496bcd7c0d171056b8afc69f2c4d9a1270d40c
2016-09-28 11:35:13 -07:00
Sunny Goyal
4ff424abf9 Fixing overlay scroll state not getting reset properly when
scrolling is was cancelled

Bug: 30834333
Change-Id: I3605cd2dd939057905d297b5a25ce8669d578125
2016-08-12 13:14:56 -07:00
Sunny Goyal
6178f13e2d Moving the QSB out of the cell layout to the Drag layer
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
2016-07-13 12:37:08 -07:00
Sunny Goyal
53fe1f26d3 Updating page indicator content description to indicate click target
for apps list

Bug: 29777235
Change-Id: Ia3dc20db7ec06455429389de5752b9bcfff15555
2016-07-08 08:49:34 -07:00
Hyunyoung Song
7744169812 Extend all apps pull up activation area to page indicator view
b/29752599

Change-Id: I3ee5efefa98defbc8f386895753946efe79708b4
Background: page indicator's background is where the caret symbol is.
2016-06-27 23:51:36 -07:00
Sunny Goyal
d0a6ae7f64 Accessibility fixes and updates
> Adding custom actions on the page indicator to go to overview mode
> Disabling custom actions on the first page
> Disabling 'move page left' on the second page

Change-Id: Ib8154f70cb3f93e663a881357c6c46c33253887f
2016-06-22 14:17:34 -07:00
Hyunyoung Song
74b5af3529 Fixes to all apps pull up work
b/28917826

- 2+ workspace page also slides up
- pull up touch interaction doesn't trigger only when yslop > xslop
- animation duration should be set independently when all apps button is used.
- workspace state is correctly set (drag and drop from the trays work)
- after lock screen, hotseat is positioned correctly
- Remove initial jump when sliding up
- Improved tuning on sliding
- Alpha value set differently on backbround and content of all apps

Still not fixed:
- Landscape
- Search edit text box styling
- All apps scroll bar

Change-Id: I817094b0f1ada5052ee604539459f556a99cadf1
2016-06-08 17:01:59 -07:00
Sunny Goyal
7c786f75d1 Allowing the first screen to expand to the screen edge
This allows the QSB to extend all the way to the edge
Change-Id: I43c6e21e44fef7fffe6fb12b7afb95549b68679f
2016-06-06 16:41:57 -07:00
Sunny Goyal
da4fe1a624 Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).

Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
2016-05-27 18:23:29 -07:00
Sunny Goyal
c487bd34ac Making page indicator an abstract class and implementing some common methods.
Change-Id: I06613428c54f1f086090580db8242cf81f7fb128
2016-05-20 12:49:59 -07:00
Sunny Goyal
c64cfdd8fa Updating the folder page indicator to be more like the
framework page indicator (used in quick settings)

The active page is indicated with the accent color. During scroll
the active indicator expands to 2 dots corresponding to the visible pages.

Change-Id: Iaf57836b642cf87e5eed98048ecca7dd8e7643a4
2016-05-18 17:50:34 -07:00
Tony Wickham
f549dab31d Add PageIndicator interface and custom PageIndicatorLine view.
- 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
2016-05-17 18:53:57 -07:00
Tony Wickham
8f7ead3e94 Update page when scrolling/flinging in free-scroll.
Bug: 28054048
Change-Id: Ic22e7e717c3ead52dd6fb7495c37be3837e11030
2016-05-12 16:28:24 -07:00
Sunny Goyal
534058492f Removing some deprecated callbacks
Change-Id: I3361383fe19faa64d862bbf879edb8c09937dc6f
2016-04-14 12:30:40 -07:00
Sunny Goyal
9f44d7dc3a Revert "Updating current page when changing the frescroll mode"
This reverts commit debf81470d.

Change-Id: Ib5b60c21be2d112c6c6e453168cb5bf01a7bd971
2016-04-07 20:06:54 +00:00
Sunny Goyal
debf81470d Updating current page when changing the frescroll mode
Bug: 28054048
Change-Id: I081db915445b60f96607d4a0c30ffc8ab476fe24
2016-04-06 18:42:31 -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
Tony Wickham
dadb304b46 Pinch to zoom out into overview mode.
There are 3 classes coordinating the gesture: PinchToOverviewListener,
PinchThresholdManager, and PinchAnimationManager.
- PTOL listens for the pinch gesture on DragLayer.
- When a pinch is detected, the PTOL keeps track of the interpolated
  progress and passes it along to both the PTM and PAM.
- The PTM uses the progress to determine whether a new threshold has
  been passed, and tells the PAM to animate it if so.
- The PAM uses the progress to animate things like workspace scale
  throughout the pinch.
- If the pinch ends early, the PTOL uses the last passed threshold to
  determine whether to animate to workspace or overview, and tells
  PAM to perform the animation at the same velocity as the pinch.

Bug: 24414635
Change-Id: I9e53706c705f8b2982409bf7c223d8d0e9618bf0
2016-03-04 16:52:54 -08:00
Sunny Goyal
e670159cfe Merge "Fixing homescreen getting blank when returning from the overlay" into ub-launcher3-calgary 2016-03-01 01:07:39 +00:00
Sunny Goyal
061380a04d Fixing scrollTo getting called even though the gesture was handled by an overlay
Change-Id: Ia46c4ef3db8a3ae4fa615625b7b983d7e461c797
2016-02-29 15:15:39 -08:00
Sunny Goyal
ee68816be8 Fixing homescreen getting blank when returning from the overlay
Change-Id: Ie11b92cd59c90e71b9b58eeede742ef0c5b28380
2016-02-26 08:47:21 -08:00
Sunny Goyal
c86df470ab Adding overlay interaction support
> Sending unboundX to the overlay which is the total untranslated X and not just deltaX from last frame
> Handling overlay callback and translating workspace accordingly

Change-Id: I3bd8d9efac738e9ce131758f0e5ff1b9c1d6a8fc
2016-02-25 10:01:13 -08:00
Adam Cohen
f9c184a619 Refactor FolderIcon to separate the preview effect into it's own class
-> 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
2016-02-12 17:28:31 -08: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
Sunny Goyal
75c7c5ae28 resolve merge conflicts of 6362683acb to ub-launcher3-calgary.
Change-Id: Id48bf33912bf927121356a08b8501ee0070bfdc7
2016-01-27 16:55:50 -08:00
Sunny Goyal
8bf6f311e8 Removing unnecessary new object creation in dispatchDraw
dispatchDraw was calling getVisiblePages which in turn calls
getDescendantCoordRelativeToParent and created multiple new abjects

Change-Id: I401fec076183979d30dfdbbdc02a57bd79f3886d
2016-01-23 14:42:25 -08:00
Sunny Goyal
92899800b7 Fixing custom content screen not aligned properly in landscape
am: ecdc24f6f6

* commit 'ecdc24f6f667319db56a16dd7d1efda16dfe662e':
  Fixing custom content screen not aligned properly in landscape
2016-01-12 18:45:48 +00:00
Sunny Goyal
ecdc24f6f6 Fixing custom content screen not aligned properly in landscape
Bug: 26413100
Change-Id: I1a111c9d2b0dfdfbc3cbd566e5784a1ed2bb6719
2016-01-12 10:35:55 -08:00
Sunny Goyal
08442b84a2 Preserving the open folder state across rotation
Bug: 24900496
Change-Id: Ie1318b82b497957b99603b11ec338dd50d51b962
2015-12-08 14:14:26 -08:00
Sunny Goyal
4740e6ce15 Merge "Keeping the focus indicator on the widget view, while a child is focused" into ub-launcher3-burnaby-polish
am: 093a58cc77

* commit '093a58cc776be2a3cd5aed9d14df9c78a35af052':
  Keeping the focus indicator on the widget view, while a child is focused
2015-12-01 23:36:37 +00:00
Sunny Goyal
093a58cc77 Merge "Keeping the focus indicator on the widget view, while a child is focused" into ub-launcher3-burnaby-polish 2015-12-01 23:19:11 +00:00
Sunny Goyal
cc4c22008c Adding margin to Drag layer instead of checking for right insets at every place
am: 9326461652

* commit '9326461652c36c2ddd888d1452cf7f075a391868':
  Adding margin to Drag layer instead of checking for right insets at every place
2015-12-01 22:49:42 +00:00
Sunny Goyal
9326461652 Adding margin to Drag layer instead of checking for right insets at every place
Bug: 25692432
Change-Id: I853f41a17c54b30b7772b9fd8556d9465de84752
2015-12-01 14:43:32 -08:00
Sunny Goyal
0c4e37223f Keeping the focus indicator on the widget view, while a child is focused
Bug: 25199581
Change-Id: Ie08d1438ae0c1b5d4fcaa4d642508c1b9db0f5d4
2015-12-01 14:38:14 -08:00
Tony Wickham
38b1220767 Stop clearing focus when snapping to a new workspace page.
am: 04e2c9ef56

* commit '04e2c9ef5663262fc9dd08ffc4b59fe305a017f3':
  Stop clearing focus when snapping to a new workspace page.
2015-11-03 22:07:57 +00:00
Tony Wickham
04e2c9ef56 Stop clearing focus when snapping to a new workspace page.
Clearing the focus was causing the first child in the new page to
immediately take focus, which caused FocusIndicatorView jank when
using a keyboard.

Bug: 25256728
Change-Id: I5ab31ebc3fe370d7ac9e9792b30dab3467023738
2015-10-30 18:04:48 -07:00
Sunny Goyal
b5772c8b4f am 21d89fbf: Merge "Fixing overscroll effect when the navigation bar is opaque" into ub-launcher3-burnaby-polish
* commit '21d89fbf8c444c64a4c85d25a25bbe3b79719de9':
  Fixing overscroll effect when the navigation bar is opaque
2015-10-07 20:45:51 +00:00
Sunny Goyal
0abb36f692 Fixing overscroll effect when the navigation bar is opaque
The navigation bar is opaque on mobile devices in landscape mode.
Launcher should ignore the right insets and draw the edge effect appropriately.
Also draw the black bar under the navigation bar, just in case we assume it
to be opaque, but it was not actually opaque.

Bug: 18526657
Change-Id: I1d49dcb82b8a5ee25009bc738cd9b8c0c5c88263
2015-09-22 10:57:08 -07:00
Tony Wickham
869306140d When placing a widget, go to a page with enough space.
The search for this page starts at the current one and
continues to the right (on LTR) until a page is found that
can accomodate the widget, taking possible resizing and
reordering into account.

Bug: 11338870
Change-Id: I2e9a310eb8f74024dca9150f55a525e1309c2f07
2015-09-09 17:08:50 -07:00
Tony Wickham
29d853c2dd Make sure all overlay panels are visible as user free scrolls.
Previously there was a workaround to ensure that adjacent panels were visible
while in the overview or spring-loaded states, but it incorrectly kept only
those original pages visible even while the user scrolled to other pages. So now
we only use the workaround when first entering the overview or spring-loaded
states, and then fall back to the default getVisiblePages() implementation in
PageView when in free scoll mode.

Bug: 23766408
Change-Id: I692ec00b9cd6d7889c374aee41b85abd0a5d8d3c
2015-09-09 09:25:51 -07:00
Sunny Goyal
f4f89ef608 Using context.getString for getting formatted strings, as it works better with different locales
Change-Id: I9639bb11197e656c5cdd3a4d63f913edcc0987cb
2015-09-02 22:15:29 +00:00
Vadim Tryshev
fedca43d39 Moving drag-drop related code into a separate package.
This is per an earlier CR comment "we should probably move all this code to its own package (launcher3.dragndrop) in a separate cl".

I'm not moving DragSource because it's referred from gsa code.

Bug: 22609426
Change-Id: Ia7204dab99c0c395c66b77143a2d60411153f5f3
2015-08-20 07:45:57 -07:00
Sunny Goyal
c268148f06 resolved conflicts for merge of 9fc953b9 to ub-launcher3-master
Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
2015-08-17 14:43:41 -07:00
Sunny Goyal
9fc953b94d Version code cleanup
> Renaming Lmp to Lollipop
  > Lollipop_MR1 instead of directly using 22
  > Using M APIs directly instead of reflection

Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
2015-08-17 13:26:01 -07:00
Sunny Goyal
106bf64f4a Some cleanup around drag and drop
> Instead of resizing the rect for dragoutline in onDrow, store the resized rect itself
 > Remove unnecessary inverse matrix calculation

Change-Id: If13c3c5aaecba5a1d3a4f5d39199ed82e9662c62
2015-08-13 16:54:58 -07:00