Commit Graph

33 Commits

Author SHA1 Message Date
Sunny Goyal
ccc414bb1e Accessibility: Folder drag and drop fixes
> Do not allow empty cells on the last page to be click targets
> Make drop targets accessible
> Do not close folder on tap outside

Change-Id: I7cae20e45097092f41408b888e20b6c40c17d981
2015-05-05 10:18:22 -07:00
Sunny Goyal
f7a29e83f0 Removing some unused method params from CellLayout
> Replacing various distance calculations with Math.hypot
> Moving findVacantCell to Utilities

Change-Id: I0cb194b603e52b3bb2b29a095bb4da2bb408ab13
2015-04-24 15:28:20 -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
bc927f9c24 Make sure DragLayer layout params are of the correct type
bug 18141419

Change-Id: I50695a62cf9e1f25c054ac2c7197cd056d54cfae
2014-10-28 16:16:46 -07:00
Adam Cohen
a6d0492e5f Allow LauncherOverlay to access and manage insets
Change-Id: Ib9faf37eb22ad2a0b18c076978ec9f2fd8864c0c
2014-10-24 11:47:30 -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
Sunny Goyal
424418bb50 Updating clings, removing ununsed clings
issue: 16127412

Change-Id: I1d18515765100ff10d33439b3ac39ebfc5da35c7
2014-08-25 11:38:02 -07:00
Adam Cohen
8cc0550715 Update adjacent page hints
-> draw the hints immediately above the workspace

Change-Id: Id09070e3876516daf9650132052ab61d02a2cf4d
2014-08-22 18:34:07 -07:00
Adam Cohen
c50438c802 Unify next / prev page hints for drag and drop across devices
-> Eliminate the white bgs on tablets during drag (issue 15880213)
-> Add stateful (active and rest) next / prev page hints (issue 15937059)
-> Fix recent regression which allowed overscroll in custom content area

Change-Id: I1198dc88ca8570cb9e1afd3ca939be06a8dea92e
2014-08-19 22:17:10 -07:00
Sunny Goyal
95abbb330c Updating the virtual preloader UX.
> No click feedback when in preloader mode
> No preloader UI when drawn in drag layer
> The preloader consists of a background 9 patch image and a circular progress
is drawn in the content region of the background.
> The preloader is drawn in a slightly larget area than the actual bounds to
make the circular progress more prominent compared to the icon.

issue: 15835307
Change-Id: Ifec3d93ecf1fac994d1128b517da3797247e7ed6
2014-08-11 12:32:04 -07:00
Adam Cohen
6c5891a9fc Preliminary work on Material Transitions
-> Early exploration of AllApps Hero transition with
   circular reveal
-> Stripping a bunch of dead code from AppsCustomizeTabHost
-> Moved background scrim to DragLayer
-> Removed "SMALL" state from workspace: replaced with
   NORMAL_HIDDEN and OVERVIEW_HIDDEN. This is mainly to
   reduce the overall usage of the z-space model between
   allapps/widgets and workspace. There are vestigial
   remains of this model, mainly due to the overview
   mode, and a bit for spring-loaded.

Change-Id: If2302a24394f0ec66621f01ffa2fc4934aa10c3f
2014-07-18 17:56:42 -07:00
Adam Cohen
b670f195ff Ensure the intro view is always the top view in the draglayer if it is present
-> On devices post-api-16, we can achieve this just with child drawing order
   but on level 16 devices, child drawing order doesn't give us touch
   dispatch which is problematic for the intro screen.

issue 13796017

Change-Id: Ibf89ae91d8489f2de1eb9c8f235a0e6e6aed1847
2014-04-08 16:56:09 -07:00
Adam Cohen
2d783ce2f4 Fix pre sdk-18 compatibility (crash in dispatchDraw)
issue 13801679

Change-Id: I25b997179fd8eb7cdec6fc48d81533fb1c3094ce
2014-04-07 14:12:54 -07:00
Adam Cohen
d3a4e420f8 Attempt to fix crash on workspace drag and drop on certain JB devices
issue 13801679

Change-Id: I4769220ddeab566a869050b20d6064809c70bc19
2014-04-04 16:53:02 -07:00
Adam Cohen
432609a246 Adding in-activity intro screen (issue 12905636)
Change-Id: Ifb016ca6e5052fd91535b98a39f78569200955a8
2014-03-20 11:48:22 -07:00
Jorim Jaggi
55bd9725d5 Implement spring-loading of folders when dragging over.
Bug: 8912132
Change-Id: Id81889a133e56461df2e20599c4b40020818ba18
2014-02-12 22:16:51 +01:00
Winson Chung
a694524047 Adding migration Clings. (Bug 11973614)
- Refactoring Launcher cling code out to LauncherClings.

Change-Id: Iff4f84f5b8bfeb69b1be0b4802022c3eb20b6f2c
2014-01-10 22:28:16 +00:00
Mihail Dumitrescu
693fbc7f17 Remove a non-obvious fall through in a switch statement.
This CL does not modify the result of calling onInterceptHoverEvent()
assuming isEventOverFolder() has no side effects. The only change is
that isEventOverFolder will now be called once rather than twice when
action == MotionEvent.ACTION_HOVER_ENTER and isOverFolder == true.

Change-Id: Icc28ab880cf5094e49f51d72035891e924cb2031
2014-01-07 18:49:46 +00:00
Winson Chung
3a7bea5981 am 89ee93e0: Merge "Use the icon bounds for all calculations." into jb-ub-now-jolly-elf
* commit '89ee93e0f8b6ac1ed6aefc2b940d1606f2027491':
  Use the icon bounds for all calculations.
2013-11-15 10:22:01 -08:00
Winson Chung
eeb5bbc940 Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic
grid scales icons down, due to the drawable bounds
not being equal to their bitmap sizes.

Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
2013-11-14 11:18:18 -08:00
Dave Hawkey
26279c6d09 Set insets on newly added views.
This is needed for adding an internal-only dogfood indicator above the
search plate in http://ag/386251.

Bug: 10954064
Change-Id: I72cb0e978a5118ce45f69a493ac631d0c165b237
2013-11-07 14:37:43 -07:00
Adam Cohen
28f852ab67 Fix drop animation issue in springloaded
Change-Id: I1d8bf9d92ab7b94238e3e6a27b0eebf2c9af6872
2013-10-15 16:13:28 -07:00
Adam Cohen
b0f3d74815 Fix widget longpress issue where longpress misfires (issue 10988288)
Change-Id: Ibe4aa4d92a1b419b63ff3cf61164c637fb579221
2013-10-08 19:17:12 -07:00
Winson Chung
6da63f81f8 Ensuring that the folder scrim background spans the full device height. (Bug 10965246)
Change-Id: I603d6ed61d01c6b0a460dc0205eceb25f6964b9d
2013-09-27 12:32:26 -07:00
John Spurlock
77e1f47520 Add system window inset support to DragLayer and children.
Instead of fitting system windows as before, DragLayer now
lays out under the system windows.

DragLayer will simply add the system window insets to each
child's layout margins by default.  e.g. for Hotseat, Page
Indicators, QSB, Search Overlay.

Children that want to use the full viewport can declare so
by implementing a new Insettable interface.  System window
insets will be passed to Insettable#setInsets(insets) and
the child can do what it wants with them.

Currently, two of DragLayer's children implement Insettable:

1) Workspace (for the -1 screen).
   Full screen pages are given the entire viewport, paged
   view offsets modified to end up in the right place now
   that the viewport is larger (the full screen height).
   Non-full screen pages like the normal icon pages simply
   apply the insets to end up in the same place they did
   before.
   NowClientCardsView uses the full viewport, applying the
   insets as padding. Will want to better take advantage
   of this new real estate in a future CL.

2) All Apps (AppsCustomizeTabHost).
   Applies the insets as layout margin one level down, so that
   the bar area is opaque during the transition, but visually
   the content lands in the same place.

(Also add db_files to .gitignore to ignore the output of the
db tool)

Bug:10687177
Bug:10652189
Change-Id: I80b25d63884d244fcf704b24dad9497ee0d8b453
2013-09-11 16:29:34 -04:00
Winson Chung
5f8afe6280 Initial Changes for Dynamic Grid
Change-Id: I9e6f1e5167791cf8dc140778dfa447f86424e9bf
2013-08-20 10:56:05 -07:00
Adam Cohen
61a9a5c359 Don't switch pages when dragging out of folder
-> Fix bug where page switch indicator wouldn't draw on right
-> Fixed some code related to folder reordering -- no behaviour change
   yet, but once the new AutoScroll is in, this should behave correctly
   (ie. shouldn't reorder while in scroll zone)

Change-Id: Ic14a8d70858777164f094204472dc6a726dd461a
2013-08-14 13:36:51 -07:00
Winson Chung
c763c4e4d2 Verifying that new applications are added and fixing issue with new items getting wrong ids.
- Fixing issue where the LauncherModel would be out of sync on first migration, and subsequent crashes

Change-Id: I6f58b09b615b28958c7f941e58ff9ae0ee3ba939
2013-07-25 14:50:49 -07:00
Winson Chung
c9ca298098 Fixing performance issues with drawing all visible pages.
Change-Id: I17736c1e6afa1f4a961c136fe82bf1d632cbe6cc
2013-07-19 14:01:19 -07:00
Adam Cohen
7d30a37007 Porting PagedView from KG to gain simplified scaling model, reordering
-> We are no longer scaling individual Celllayouts, instead we are scaling
   the entire Workspace (and the CellLayouts come along for the ride)
-> Due to the above change, many assumptions were broken. In particular,
   our drag and drop / animation archiecture is fairly fragile due to the
   frequent and complex mapping of points between different bits of the
   hierarchy. This CL contains a number of fixes which address such
   breakages.

Change-Id: I2e630eab17528729b764b61f587858f6499fd318
2013-07-08 18:32:57 -07:00
Daniel Sandler
e4f9891f01 Lazily instantiate LauncherAppState.
The application context for LauncherAppState is supplied by
the application whenever it starts; don't ask for an
instance before that.

Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
2013-06-27 15:17:11 -04:00
Daniel Sandler
cc8befac35 Move LauncherApplication's state and code to LauncherAppState.
This removes Launcher's static data and other state out of
the Application object. Now LauncherApplication (extends
Application) exists only to instantiate LauncherAppState.

Change-Id: I4e323bd78b77536b92054105536a55c0c2c19ba8
2013-06-11 22:01:47 -04:00
Daniel Sandler
325dc23624 Launcher2 is now Launcher3.
Changes include
  - moving from com.android.launcher{,2} to
    com.android.launcher3
  - removing wallpapers
  - new temporary icon

Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b
2013-06-05 23:30:20 -04:00