Commit Graph

335 Commits

Author SHA1 Message Date
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
Sunny Goyal
5d2fc32e6d Several animation calls cleanup
> Using View property instead of strings to avoid extra reflection step
> Using ViewPropertyAnimator when several properties are being animated

Change-Id: I41625643b38b70bac11e2c81d18058ec878d73bd
2015-07-31 13:07:14 -07:00
Sunny Goyal
62231b108d am cb037eee: Fixing overscroll not drawn in rtl
* commit 'cb037eee8ca863ad99d9cdbacd6a82759295e5a0':
  Fixing overscroll not drawn in rtl
2015-07-09 17:19:36 +00:00
Sunny Goyal
cf25b52763 Removing some unused PagedView attributes
Change-Id: I1c7312b46ec95286d8e49d3dee60b1bf4d98dc20
2015-07-09 10:06:31 -07:00
Sunny Goyal
cb037eee8c Fixing overscroll not drawn in rtl
> Using the currect right page index in rtl
> Updating current scroll after max scroll has been calculated. This prevens an extra overscroll when the layout happens for the first time.

Bug: 22358804
Change-Id: If07132701936e06f727211122a3b3e6f8426c07b
2015-07-08 16:44:37 -07:00
Sunny Goyal
5e41a27fdb Fixing paged view overscroll effect being drawn outside the screen
bounds when in transposed layout.

Change-Id: I93be6a003b7d28708697990cfae8c7be96f84676
2015-06-22 15:11:31 -07:00
Sunny Goyal
4d113a5ff4 Using material style overscroll effect for workspace and folders
Bug: 21335369
Change-Id: I53cc6edfa87334b9326f1dedd90c3e2222beade5
2015-06-19 19:53:34 +00:00
Adam Cohen
5b139a5ca7 Remove inifinite recursion from PagedView
-> thanks adamp@

Change-Id: I36836357f5f194ac69530475b124595174c8b636
2015-06-15 11:16:18 -07:00
Adam Cohen
b2b02b9bd2 Fix a small UI nit with screen reordering
-> When in overview mode, flinging the pages can leave the scroller
   running (invisibly) for much additional time, since the scroller
   fling bounds far exceed the alloawble scroll bounds (in order to
   achieve a hard wall type effect)
-> When this is happening, user couldn't pick up a page for reordering
-> Ended the scroller early in this case to avoid the problem

Change-Id: I8b6f140d9a87bb742e57625e90ca7d76a2158e28
2015-06-10 18:45:38 -07:00
Sunny Goyal
316490e636 Removing some synthetic method creation
> Make package-private and @Thunk all private methods and constructors accessed from inner classes.

Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
2015-06-02 10:04:59 -07:00
Vadim Tryshev
04a9bc4a50 Merge "Setting scroll X, Y and related attributes for TYPE_VIEW_SCROLLED event." into ub-launcher3-burnaby 2015-05-28 22:07:56 +00:00
Vadim Tryshev
7066c1235f Setting scroll X, Y and related attributes for TYPE_VIEW_SCROLLED event.
Change-Id: Idec0e333a0d3c3a0c232d3e2240f18174e0ea88c
2015-05-28 15:06:18 -07:00
Vadim Tryshev
8b80baec06 Merge "Fixing non-scrolling of workspace view after opening/closing AllApps vew. The reason for non-scrolling was excluding the pages view from the accessibility hierarchy by marking it as non-important. So, I just removed the code manipulating [non]importance of the PagedView." into ub-launcher3-burnaby 2015-05-28 21:42:16 +00:00
Vadim Tryshev
7af0d4474f Fixing non-scrolling of workspace view after opening/closing AllApps vew.
The reason for non-scrolling was excluding the pages view from the
accessibility hierarchy by marking it as non-important. So, I just
removed the code manipulating [non]importance of the PagedView.

However, this would make the PagesView accessibility-focusable, which is
undesirable. It becomes focusable because it supports long clicks in "normal"
mode. Since it doesn't support accessibility long clicks (i.e. Overview mode is
fetched NOT via accessibility long-click), I just disabled accessibility
long-clickability, which made PageView non-focusable, and it started to behave
correctly.

Bug: 21281859
Change-Id: I7ab01e5f39cb37c456c961199c27458c9bda1c3d
2015-05-28 14:33:36 -07:00
Sunny Goyal
1740d901ff Fixing build breakage
Change-Id: I2d8ac9a92d2da3d6b0f52ff8a6e3683b05663aec
2015-05-27 11:14:01 -07:00
Sunny Goyal
5a1f53b306 Removing SmoothPagedView as all its methods are disabled
Change-Id: I83c99bb3d3546693200d64e2233957b4c679e7e6
2015-05-27 10:24:24 -07:00
Sunny Goyal
a1fbd84b79 Fixing unnecessary padding added to pages in overview mode
Change-Id: Icd17c2956b201ea0b6c6a2a495f567f51987b1ac
2015-05-20 13:40:57 -07:00
Vadim Tryshev
bc51766dea Merge "Removing itemCount, fromIndex and toIndex from AccessibilityEvent.TYPE_VIEW_SCROLLED sent by PagedView. This causes an additional reduntant voice message on scroll (see the bug)." into ub-launcher3-burnaby 2015-05-20 18:10:54 +00:00
Vadim Tryshev
cd4f4138f0 Removing itemCount, fromIndex and toIndex from
AccessibilityEvent.TYPE_VIEW_SCROLLED sent by PagedView.
This causes an additional reduntant voice message on scroll (see the
bug).

Also, setting these attributes violate rules set here:
http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html
i.e. that these fields should be set only for descendants of
AdapterView.

Note that we can't just stop sending TYPE_VIEW_SCROLLED, because in this
case, accessibility focus won't be set after scrolling.

Bug: 21304383
Change-Id: I84f8e064d8209c0e09d6827551e00c9913829b57
2015-05-19 21:34:55 +00:00
Sunny Goyal
83a8f042ad Moving LauncherAccessibilityDelegate to accessibility package
Change-Id: I510204a5a12abf2da2757f3e3f8b0e8869a6b04a
2015-05-19 12:52:30 -07:00
Sunny Goyal
a8a4546805 Merge "Adding padding to the folder content" into ub-launcher3-burnaby 2015-05-15 02:22:00 +00:00
Sunny Goyal
41b22c0924 Overriding proper layout params methods for a custom ViewGroup
Change-Id: Ib6176a0da510eaa0992551ab4afa6f73b4763db0
2015-05-14 15:21:53 -07:00
Sunny Goyal
7066003b20 Various lint error fixes.
> Fixing some RTL errors by specifying both marginStart and marginLeft
> Moving all layout direction checks to Utilities
> Explicitely adding @TargetApi before every method

Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
2015-05-14 12:28:07 -07:00
Sunny Goyal
22fc63ee29 Adding padding to the folder content
Change-Id: I88e56ff1aa26282e0167e2599f1b34ee374b705f
2015-05-13 16:01:26 -07:00
Vadim Tryshev
8a496ac99e Merge "Fixing accessibility scrolling events generated by PagedView:" into ub-launcher3-burnaby 2015-05-13 17:42:31 +00:00
Vadim Tryshev
f4715974b8 Fixing accessibility scrolling events generated by PagedView:
1. Not generating scroll events from snapToPage(). It already gets
   generated from computeScrollHelper().

2. Not setting action because doing so is not mentioned here:
   http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html.

3. Not generating scroll event when the page stays same (before it was
   generated, say, when we simply returned from the AllApps view to
   Workspace).

4. From/To index is not the old and new page numbers; they are indices
   of the first and last item; in our case, the item is the page, and
   both FromIndex and ToIndex should be set to this page number.

Bug: 18761184
Change-Id: I3dadf816c3d45b8bd42a13930344874584467499
2015-05-11 17:40:07 +00:00
Sunny Goyal
067e5e0177 Merge "Removing some dead code in paged view" into ub-launcher3-burnaby 2015-05-07 17:19:37 +00:00
Sunny Goyal
8e2133b2c2 Removing some dead code in paged view
> Removing fling to delete pages
> Removing delete drop target for pages
> Removing syncpages support (was used by paged all apps)

Change-Id: I0a35ae30da8c48a27aac341bbee9fb5623665902
2015-05-06 14:12:05 -07:00
Sunny Goyal
1d08f70441 Accessibility: Page re-ordering in overview mode
Change-Id: I5fc0ad326a63b6768cb1fae55ee6e05a9fc2b659
2015-05-06 12:06:48 -07:00
Winson Chung
dc61c4d414 Refactoring to single path for overview mode.
Change-Id: I590a813c6f031342d75c3a6c3e9c9afda1808f2e
2015-04-21 15:54:22 -07:00
Hyunyoung Song
df41097194 Merge "Focus handling null pointer exception during monkey tests." into ub-launcher3-burnaby 2015-04-16 21:52:13 +00:00
Sunny Goyal
3e2ff8afef Updating maxscroll only after layouttranstion has finished
Bug: 20092568
Change-Id: I6ff8d9759b71b0b00ebfdaa75b558254dbeb0ef9
2015-04-16 14:50:22 -07:00
Hyunyoung Song
b76cd628e6 Focus handling null pointer exception during monkey tests.
- Also fix a bug where the focus is not navigating to the next page when there
isn't an icon within +45 and -45 range of the origin.

b/20294717

Change-Id: I16dac5c6a0463fbc9f56a447abedad18abadde98
2015-04-16 14:34:09 -07:00
Sunny Goyal
2f0ec85acf Disabling overscroll when folder has only one page
Change-Id: I3cc3964dba1af8d96822e46baf2dc9cfaee824ae
2015-03-26 13:38:27 -07:00
Adam Cohen
091440a9cb Reducing method count by eliminating synthetic accessors
Elimates 304 methods based on dex analysis

The java compiler generates sythetic accessor methods for all private
fields, methods and contructors accessed from inner classes. By marking them
package-private and @Thunk instead, sythentic accessor methods are no
longer needeed. These annotated elements should be treated as private.

Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
2015-03-20 11:15:54 -07:00
Adam Cohen
c2d6e897db First pass of the Launcher Overlay interface / impl
-> Added simple reference launcher extension
-> Make launcher able to handle a null qsb

Change-Id: Ib1575243cac800a335e95bbf00cdc394bb4741c3
2014-10-22 17:40:39 -07:00