Commit Graph

65 Commits

Author SHA1 Message Date
Patrick Dubroy
cd68ff5b88 Move drop anim into the Workspace to prevent clipping issues 2010-10-29 13:52:42 -07:00
Adam Cohen
1b0aaac0b3 -> Made outline of current page fade out
-> Added new assets for homescreen outlines

Change-Id: Ic19b32a749fd4109bd5601c8b220759aab56603c
2010-10-28 11:45:12 -07:00
Winson Chung
a9abd0e0bd Initial changes to allow dragging external shortcuts to launcher using the same InstallShortcut intent.
Change-Id: I21b57115429ed37d604084ae01308d1d3f33ee7e
2010-10-27 18:35:04 -07:00
Romain Guy
3cf4c03125 Don't build bitmaps when running in GL.
Change-Id: I28c93256bca748be6a00698a6c41cbab5dd4a349
2010-10-26 14:29:35 -07:00
Patrick Dubroy
a944215d36 Fix disappearing icons due to div-by-0 in animation. 2010-10-25 12:11:23 -07:00
Winson Chung
ece7f5b3b5 Altering homescreen spacing to match design.
Change-Id: I8b859992fe843d0cf688cb84bcbaab6dbeccb6fb
2010-10-24 13:31:32 -07:00
Michael Jurka
883f55b1d2 Correctly preserve state on orientation changes
Bug: 3049975
2010-10-21 15:47:22 -07:00
Michael Jurka
f3ca3ab695 Fix bug that allowed multiple items in one cell
Fixed issue where opening a folder allowed items to be placed on any cell, even if it was occupied.

Bug: 3094164

Change-Id: I392e7236f9cd7ea0b09f36e249d2a57c9934dc8e
2010-10-21 11:30:28 -07:00
Patrick Dubroy
8e58e91606 Various cleanups in the drag viz code.
Most importantly:
- Don't allocate a new Paint object in CellLayout.onDraw
- Scale holographic outlines based on the screen density
2010-10-20 14:37:49 -07:00
Patrick Dubroy
ce34a9768b Animate items into place when dropping on home screen 2010-10-19 10:42:24 -07:00
Michael Jurka
18014791be Added bounce animation when item added to screens
Change-Id: I87d9e8545e2de588d083b48991d932eb904f6e3a
2010-10-18 18:29:21 -07:00
Patrick Dubroy
08ae2ec484 Fix bug drag viz & hover state
Change-Id: I6b40d4dd43a2ee0c127df938375870347faeb5f6
2010-10-15 14:12:36 -07:00
Michael Jurka
d718d6a7ba fix setting/unsetting hover on thumbnailed screens
cleaned up dragenter / dragexit events so they're only received by CellLayouts if the workspace isn't small

ignoring enter/exit scrollarea events when workspace is small
2010-10-14 15:45:30 -07:00
Chet Haase
472b281d5c Updating code to use new non-generified animator APIs
Change-Id: Ie1928a22f774b226d90fa0918f61dba35d183dd6
2010-10-14 10:51:21 -07:00
Patrick Dubroy
fe6bd87881 Fix some incorrect animation code that might be causing visual glitches. 2010-10-13 18:13:11 -07:00
Joe Onorato
4be866d3a1 fix 3029324: Implement new drag feedback
Add "shrinkwrap" icon outlines to visualize where the item will land
2010-10-13 12:01:04 -07:00
Michael Jurka
3e7c763453 updated Workspace thumbnail behavior
- in All Apps mode, fade thumbnails completely
- while dragging, have thumbnails re-appear
- while dragging, give screen thumbnails that can accept drops a different appearance (green outline instead of blue)

Change-Id: I72ddf8a0f1947d35ef11514b7d4eea9ae5eee6e2
2010-10-10 15:03:45 -07:00
Patrick Dubroy
49250ad530 Fix bug with dragging crosshairs sometimes being too bright
Change-Id: Ieb20ab96e73c5f297ffd69d29472024c11978a13
2010-10-10 11:18:29 -07:00
Michael Jurka
9987a5c45e Fixed 3066306 Widget measurement wrong in customize tray 2010-10-08 16:58:12 -07:00
Chet Haase
00397b1d92 Use new TimeInterpolator interface for interpolation
Change-Id: I53e8fcbabfdb4cb69bec309aeceeddc63e1715ed
2010-10-07 11:13:36 -07:00
Patrick Dubroy
1262e36948 wip 3029324: Implement new drag feedback
- Show page borders when dragging
- Enlarge scroll region (landscape only)
- When inside scroll region, show green border on adjacent page
2010-10-06 17:39:05 -07:00
Patrick Dubroy
046e7eb472 Fix 3065611: NPE in Launcher attempting to drag app to home screen 2010-10-06 12:14:55 -07:00
Adam Cohen
9c4949e12c ->Added attribute to PagedView to specify spacing between
adjacent pages
->Fixing crash on phones
Change-Id: I8ea97ce6d569c59b6d51b544dc10b0310d294b43
2010-10-05 14:08:00 -07:00
Winson Chung
150fbab7de 3029324 wip: Drop target crossfades as it moves from position to position 2010-09-30 17:24:29 -07:00
Adam Cohen
f34bab59fc -Added 3D effect to home screen scrolling
-Added background outline fade in / out
-Modified the feel of scrolling: now using quintic
 interpolator and modified the influence of
 scroll velocity

Change-Id: Ifddcab5223ac20be7d9f800ccf09442d9b4db781

Conflicts:

	src/com/android/launcher2/CellLayout.java
2010-09-30 14:15:10 -07:00
Michael Jurka
c6ee42e25f Fix: dragging items to adjacent screens would
not properly show the available/unavailable cells

Change-Id: I47d1405315db01f87dfcce3536295d2a0d0dc444
2010-09-30 13:12:29 -07:00
Adam Cohen
3db18d2793 Fixing build
Change-Id: I181cfce3b507ffa7e81babeb2723881b6f06423a
2010-09-29 13:47:41 -07:00
Adam Cohen
0fb7db5a37 Fixing boot stall.
Revert "-Added 3D effect to home screen scrolling"

This reverts commit 9415d87eda.

Change-Id: Ib8d6602f5d82884eb1f6cc44c0cc71cc563a3a59
2010-09-29 13:04:32 -07:00
Patrick Dubroy
de7658b5e0 Show crosshairs when dragging items around the workspace. 2010-09-29 11:14:28 -07:00
Adam Cohen
9415d87eda -Added 3D effect to home screen scrolling
-Added background outline fade in / out
-Modified the feel of scrolling: now using quintic
 interpolator and modified the influence of
 scroll velocity

Change-Id: Ifddcab5223ac20be7d9f800ccf09442d9b4db781
2010-09-28 16:56:10 -07:00
Michael Jurka
6a1435d78d Fix issue where items could not be moved back
to their original positions

This also fixes crash 3038168

Change-Id: I4142a1fe32954e76e6ab02ea09f50d4bdefec67c
2010-09-27 18:35:18 -07:00
Michael Jurka
28750fba6a fixed minor code review issues from change I0280c3be
(it was submitted early accidentally)

Change-Id: I3753366b4d5e1dc228baf02eba27a2c0d8fa42cf
2010-09-24 18:34:23 -07:00
Michael Jurka
0280c3be4d Adding support for drag and drop of folders and shortcuts.
also:
- Long press on empty space on workspace now brings up customization tray
- Fixed: while dragging, items appeared to be dropping on folders two cells to the right
- Fixed: Disabling drops on folders when the workspace is shrunken
- Fixed: account for scaling of dragged items when checking if they overlap
          with shrunken workspace screens
- Making folder icons dimmable to match shortcuts and widgets
- When deciding with shrunken workspace screen we're dragging to, we now use the closest screen rather than the one that has been overlapped the most
- Refactored drag/add mechanism, removing array of occupied cells from CellInfo
- Removed dead code/variables
2010-09-24 15:28:20 -07:00
Michael Jurka
5f1c509d5a supporting swipable home screens on xlarge devices
- icons and widgets on home screens can be "dimmed"
- celllayout no longer renders a dimmed version of itself, but instead its children make dimmed versions of themselves
- celllayout no longer always takes up full size of workspace, in landscape mode 
neighboring screens (celllayouts) are visible
- on xlarge devices, in landscape mode side screens are "dimmed"
- moved holographic outline helper to its own file
- fixed bug where mini-screens were still able to scroll left/right

Change-Id: I9e85ab4147edfae1e7525c3d11d42be3fabf4f6d
2010-09-13 15:16:10 -07:00
Michael Jurka
4347705a09 making mini screen backgrounds dark, and
temporarily disabling dimmed items on mini screens
to work better with new dark wallpaper
2010-09-09 12:32:11 -07:00
Michael Jurka
0142d49e13 Changed Workspace to inherit from PagedView
- adds support for seeing dimmed side-pages on
home
- adds workspace support for pages that are
smaller than workspace itself
- removing a lot of code duplicated between
PagedView and Workspace
- tested new Workspace on Nexus One, and perf.
was indistinguishable from old Workspace in my
tests

Change-Id: Ie33ab4e8b35ac01b22894cff66650bb0ece8dfcc
2010-09-01 14:54:34 -07:00
Michael Jurka
a63c452f5b added support for dragging widgets and app icons to mini screens
- gave mini screens a rounded rect background
- mini screens change color when dragged over
- added a way to specify the active region of dragged items, to allow for clipping of whitespace at borders
- fixed: feedback while dragging was often one cell off
- fixed: bug when adding to almost-full screen
- removed unused classes

Change-Id: I2fbd2aaaee6831b288cca8dec75e7b446068e8d1
2010-08-23 15:49:58 -07:00
Michael Jurka
c28de51eed fixed crash in addVacantCell
No longer precalculating vacant cells

The previous way of finding empty cells for 
widgets/icons etc. precalculated all the possible
empty spaces. Now that we have an 8x7 grid in
tablet, there are too many possible empty spaces.

Change-Id: Ib39113fdf755935bfad257843e1618c680ed9e72
2010-08-13 11:59:51 -07:00
Patrick Dubroy
976ebec9e3 Fix incorrect offset in drag feedback, and other minor stuff.
- moved some dimens to -xlarge
- enlarge AllApps so that it's not clipped
2010-08-04 20:10:24 -07:00
Adam Cohen
d22015cd37 Cleaning up grid size specification in Launcher
This commit eliminates the notion of in-place rotations and a bunch of
associated complexities (including the notion of canonical coordinates).
Further, the number of x and y cells per workspace screen is now being stored
in a single location in the XML definition of Workspace. This fixes a couple
bugs where incorrect values were being used. Finally, eliminated the notion of
"shortAxis" and "longAxis" in terms of padding and cell count. These have been
translated to corresponding x and y axis values.

Change-Id: I30cfed66f82d739355b3f01730b28b6c0437989c
2010-08-04 11:03:47 -07:00
Michael Jurka
dee0589388 Home screen now shrinks while customizing
- added a shrink/fade animation on home screen when going into customization mode
- made items in the customization drawer larger

Change-Id: Iddbaf14aa5b1504fe94966971a1ab95c00f24331
2010-07-27 15:53:04 -07:00
Patrick Dubroy
8f86ddcb90 Generate a default preview for widgets that don't have a previewImage.
Change-Id: I3a3c24543c925a50ab34fd3cbf7947544a5ac5c0
2010-07-16 14:46:07 -07:00
Patrick Dubroy
6d5c6ecb5f Fix bug with estimate drop cell offset
Change-Id: I9b8370a858dab7d656bbfb1897e469ef4f2aec06
2010-07-14 11:14:54 -07:00
Patrick Dubroy
440c360bc3 Fix bug with drag visualization and UserFolders.
When dragging an app shortcut, it was possible that we'd show a red rectangle
around a cell occupied by a UserFolder. This shouldn't be possible -- as soon
as that cell becomes the target drop cell, the folder should start handling
the drag and drop events.

Change-Id: I1b7a8b1aa9aeb7e2f1bd51ce8d947c06455e988f
2010-07-13 17:54:03 -07:00
Patrick Dubroy
6569f2c80e When dragging items on the home screen, visualize where they will drop.
Draw a rectangle around the area where an item will land if it is dropped.
If the area is vacant, the rectangle is green; otherwise, it is red.

Change-Id: I859b52514566fa55f8c7a04493b8088d12baa476
2010-07-12 17:29:35 -07:00
Michael Jurka
0e26059548 Improving home screen customization
- Created a drawer with tabs for widgets, folders, shortcuts, wallpapers
(wallpapers are currently not implemented)
- Tapping outside the drawer dismisses it
- Moved the all apps icon to the upper right of the screen
- Adding a toast that says "No more space on screen" when dragging a widget to a full screen
- Fixed bug where you could stack two equal-sized widgets on top of each other on the homescreen (exposed by the new ability to drag widgets onto the home screen)

Change-Id: I03b65ce54a85d24328c94e0c06e249571de449ee
2010-07-09 11:56:45 -07:00
Winson Chung
aafa03cbb9 Allow for NxM layout and in-place rotation of items on homescreen.
Currently, rotation is disabled as designs are still in flux, but the NxM grid is enabled (8x4).

Change-Id: I0026f88c674719e3d67de6d6d481d2d4cd606362
2010-06-30 16:24:40 -07:00
Michael Jurka
af44209bfa First cut at new home screen customization for xlarge displays.
- Add new layout for xlarge, removing hotseat, next/prev page, etc.
- Add a "+" button in top right which switches to customization mode
- Add a widget chooser which slides up from bottom of screen
- Initial support for dragging widgets onto home screen

Change-Id: I14e2e013ccceff4066fcb7c4492b4f6bef6595e7
2010-06-28 10:49:34 -07:00
Adam Powell
7b220c71e3 am fefa0ce2: Fix bug 2646531 - regression in home screen bitmap caching 2010-05-03 15:23:32 -07:00
Adam Powell
fefa0ce22a Fix bug 2646531 - regression in home screen bitmap caching
Looks like the code path for buildDrawingCache(false) has some bugs.
This reverts to the old code path and tries to manage the creation of
those caches a bit better.

Change-Id: Ic468e9db396c51f723454dc3832e0cd1c0c82004
2010-05-03 10:23:50 -07:00