Commit Graph

152 Commits

Author SHA1 Message Date
Patrick Dubroy bc6840b316 Support uninstalling an app by dragging from all apps to trash can. 2010-09-03 12:13:00 -07:00
Brad Fitzpatrick 12815f5ac0 resolved conflicts for merge of 319226a8 to master
Change-Id: Ibeefaa496cc3970e35af007fb64344c2a0f1f82f
2010-09-01 17:10:36 -07:00
Brad Fitzpatrick 319226a894 Make Launcher.checkForLocaleChange async.
Logging indicated a 1.2 second improvement in Launcher start time
during boot (when single-threaded yaffs is very heavily contended).

BUG=2947474

Change-Id: Ie72cf02c5eacb27c6d874b6d67a0bb2de7f6b74a
2010-09-01 15:44:57 -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 f3009f662e Fixed crash when adding new folder from
customization drawer
2010-08-31 16:43:37 -07:00
Patrick Dubroy ceae05d573 Add a market button to the toolbar.
We determine the default app market activity by resolving an intent,
and fetch the icon from the activity's meta-data.
2010-08-30 18:08:43 -07:00
Patrick Dubroy df7c3a7853 Fix problems with unanimated toolbar transitions.
Rather than creating all the Animators and attempting to execute the
transitions immediately, add a separate code path for all the
unanimated cases.

Change-Id: Id615180bd0d2ed5cc60d8df351c00e8d7b13c68d
2010-08-26 18:17:08 -07:00
Patrick Dubroy 07a0de4bc4 Minor animation optimization -- use PropertyValueHolders. 2010-08-26 11:48:35 -07:00
Patrick Dubroy 6b509c1fd6 Add a market button and add toolbar button animations.
Also clean up a lot of the animation code to be more centralized.
2010-08-25 17:11:08 -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 01f0ed4126 pressing home twice shows small overview mode
Change-Id: If5a6c0942685cd52ef77562dd342f28e16ae571c
2010-08-23 15:26:14 -07:00
Michael Jurka 909f915286 Fixed bug where custo drawer remained open after power-off
Change-Id: I41f39b533fdd7b42b0f2085f8912c1bd30ec1ab2
2010-08-23 14:55:18 -07:00
Winson Chung b3347bb9f4 Adding holographic outline for paged items (sans widgets).
Fixing possible null ptr exception in Launcher.

Change-Id: Ie625a6503299cf122e5c22852846d59e66f77414
2010-08-19 16:00:41 -07:00
Patrick Dubroy 4ed6278e51 Implement button to get application info for an app shortcut.
For now, it's just a drag target like the delete zone. Once all apps
and the home screen support a selection mode, this (and delete) will
be implemented as buttons in the Contextual Action Bar.

Change-Id: I6bf43d03eefda672ea34c583a7021137da22b184
2010-08-18 17:57:59 -07:00
Romain Guy 5bbc91bbbc Add a default wallpaper for xlarge devices.
Change-Id: Icaf3fc953ca6d469d17620c0aec789e7f60c924e
2010-08-18 11:38:46 -07:00
Michael Jurka b2c838c2eb removed the temp screen rotation button
Change-Id: I26d5a840270065e43d4f66b3c53c7e9d52ce4200
2010-08-16 20:53:10 -07:00
Winson Chung 80baf5a6b3 Adding paging for the widget/shortcut/folder customization area and fixing bugs.
Adding pages for customization drawer with initial implementation of proposed flow
layout for widgets.  Fixes for keeping all apps, and widgets in sync with Launcher
Model, optimizations for reloading all apps pages when invalidating.  Adding some
animations for tab transitions and feedback when long pressing to add certain items.

Change-Id: I8d51749f3a91c964bed35681f3a9192200b0d93e
2010-08-16 15:51:43 -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
Adam Cohen da4dc5edd8 -> Set grid to 8x7 with proper spacing for landscape/portrait
-> Added a button to the top left of Launcher which switches
   between landscape and portrait. For testing purposes only.

Change-Id: I01f8cfcf92c8ba7727eeba0e59a0b8ff055598fe
2010-08-11 10:46:55 -07:00
Michael Jurka 4cb3724a2c workspace bug fixes
- fixed: pressing home sometimes left workspaces
in shrunken state
- fixed: position of delete zone (trash icon)
- fixed: workspace unshrink sometimes looked weird
when coming from all apps
- fixed: clicking power button and returning left
workspace in shrunken state

Change-Id: Ie974202926e6880ccda26ac9fe967fb587a9b7a3
2010-08-10 14:10:20 -07:00
Patrick Dubroy 3ec8bdd576 Refactor zooming animation, and apply it to customize drawer too.
Change-Id: I0bbd5a68adc82cea02dc583ac3d04e3de8c0346e
2010-08-09 14:25:36 -07:00
Michael Jurka 4bb4f735c8 small fixes to Launcher
- more robust unshrink animation
- catching a resource not found exception when
  making widget preview
- added more missing copyright headers
- hiding customization drawer when long press on widget
- long-pressing on widget is temporarily always
  springloaded to zoom in to workspace screen

Change-Id: I6c92877357e907d89840fecc4662f0700b96255b
2010-08-06 11:19:47 -07:00
Patrick Dubroy 7247f6315b Move all apps to the new animation framework, and some other all apps changes
Change-Id: Ib4c827966423d76e62db24036bbca0cd6ee46b95
2010-08-04 18:00:58 -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 7ef4f752e1 fixed crash on phones
(didn't initialize a variable properly)
2010-08-03 16:04:26 -07:00
Michael Jurka 2c3af5ffb2 refreshed apps/configure button, added search button
- configure button now has a pressed state (as
  do the other two)
- also added a cast to getX() from float->int
  because of changes in the view property code

Change-Id: I57dc6e44838f4f4354f8977a3b542e93384b3d7d
2010-08-03 14:10:37 -07:00
Michael Jurka 54f7ac30f2 Made some temporary aesthetic improvements
- icons in the customization drawer are now much 
  more tightly spaced, and no longer use the 
  default gallery styling
- wrapped some >100 char lines
- removed "Applications" from the shortcuts
  customization drawer
2010-08-02 13:56:46 -07:00
Michael Jurka 79212d8136 Fixing bugs related to starting in All Apps mode
- fixed bug where Workspace.shrinkToBottom() was 
    not always called in showAllApps
- added logic to defer call to 
    Workspace.shrinkToBottom() after first layout
    call (necessary because shrinkToBottom relies
    on getWidth() working properly)
- added ability to Workspace.shrinkToBottom()
    without animation

Change-Id: I966141a60b6b014cf97e83b4d45725b41b16e55d
2010-07-30 17:39:39 -07:00
Michael Jurka 54dd75463d Tapping on mini-screen in All Apps view now goes back to home screen
- had to disable touch event swallowing in workspace in X-Large mode to get this to work
- also changed default screen in XLarge mode to 2 (the middle one)
2010-07-30 14:47:52 -07:00
Michael Jurka 213d96354e Improved support for workspace screen thumbnails
- Shrinking workspace view in All Apps
- Added vertical margin for workspace screen thumnbnails
- Fixed bugs in a few of the Launcher state transitions (e.g. customization to all apps)

Change-Id: I9ad1c8861585d78fdb2e3bc986a614526b3cfe5f
2010-07-28 15:11:27 -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 ff5f040de1 isOpaque is not appropriate for AllAppsTabbed; replace with isAnimating(). 2010-07-26 15:23:42 -07:00
Patrick Dubroy ab962b75ee fix 2869807: Crash on boot on trygon-userdebug
Change-Id: I59f0d653e498a69bd240232b8bb89884aa0c324d
2010-07-26 12:15:55 -07:00
Patrick Dubroy 558654c6ec Switched to tabbed version of AllApps2D on xlarge screens.
- add a temporary new zoom animation for all apps
- modify AllApps2D to allow it to be transparent
- other changes to dismiss the customization drawer when appropriate

Change-Id: I5660ab77f256ded299c1721c589983a1b30d56a4
2010-07-26 11:44:33 -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 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 946ad470c7 Fixing runtime error on non-xlarge devices
Previous commit made Launcher a subclass of TabActivity, but there is no TabHost in non-xlarge layouts; Launcher now subclasses from Activity and no longer assumes that there must be a TabHost

Change-Id: I496496a602e43768d79113c7090435119cb4e5e5
2010-07-09 19:18:12 -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
Joe Onorato 3611578579 Make the loader thread a Looper and move the package manager
updates into that thread as well.

This gets rid of the ANRs that happened because both threads were
holding mAllAppsListLock.  Now mAllAppsList should only be touched
from within the worker thread.

Change-Id: Ifc4ac27e0c0a927ac66c456d097fd3d4ef6c5e1e
2010-06-18 14:40:26 -04:00
Joe Onorato d0afc87d96 Fix crash in getCurrentWorkspaceScreen.
Bug 2761789

Change-Id: I9f005c876ca20f774e6d8046e34451a7fecbe805
2010-06-11 00:03:15 -07:00
Joe Onorato cc67f476c0 Improve launcher loading performance by only doing re-binds.
This always reloads the workspace, because I think it's a less risky change and that only adds
~100ms.

Change-Id: I215b1f741f022e47ce06e78b9cfdd9967a8f1b9d
2010-06-08 11:32:28 -07:00
Daniel Sandler 843e860e8e Load All Apps before the workspace if All Apps is showing.
This change reorganizes the increasingly Byzantine loader
thread so that the order of (workspace, allapps) can be
reversed if the user is currently looking at the all apps
view. The perceptual improvement in performance is huge if
you change the Launcher's orientation while All Apps is
visible (which forces a reload/bind of everything); now that
AA doesn't have to wait behind the workspace it
(specifically, its first batch of icons) appears much, much
faster.

Bug: 2722977
Change-Id: I07a9afd5f1cff4019f2640b082872176ba0a887e
2010-06-07 16:45:16 -04:00
Daniel Sandler 3e9454a9ac Disable hotseat buttons if AllApps is visible.
Bug: 2707845
Change-Id: Ic4039f9737b3218a45bb3e8456c47927edd3fe3d
2010-05-24 11:22:41 -04:00
Daniel Sandler ab1ebd7e6f Hotseats: better strategy for finding the default browser.
To do this, we invoke resolveActivity to see what activity
would result from viewing an arbitrary (but valid) URL. If
there's just one installed, or there are multiple and the
user has chosen a default handler for http:, we take that
component and launch it with CATEGORY_HOME (so as not to
upset the URL in the frontmost window/tab/what-have-you).
We also use this information to extract the localized name
of the app, which is then installed into the hotseat as the
contentDescription (for accessibility).

If there's no default and multiple options are availble,
we'll get the activity chooser instead. In this case, we
just fire off that chooser and let the user pick an app
(possibly setting a default along the way). Because the
default may change, we reload all this hotseat information
every time one of the hotseats is tapped.

Another side-effect of this approach is that until there
exists a default browser, the original URL will be sent to
the activity the user chooses from the ResolveActivity. So
we need a sensible default URL here; one can be found in
R.string.default_browser_url (similar to Browser's
R.string.homepage_base).

This change also moves the hotseat intents and icons into
arrays.xml for easier configuration.

Change-Id: I06268df8b59e0f41f1f8b0e47f823db4c44ec761
2010-04-28 15:52:54 -04:00
Daniel Sandler c9b1877f9a New Launcher feature: "hotseat" icons.
The hotseats are permanent slots on either side of the
AllApps button. Their functions are:

  LEFT/BOTTOM: Phone
    Launched via the hardcoded class name
    com.android.contacts/.ContactsLaunchActivity.

  RIGHT/TOP: Browser
    Launched by querying to see which application is the
    default for URLs, then starting that activity directly.

In the future, it would be ideal to allow an application
with permission to access LauncherProvider to customize
these (icons, contentDescriptions, and Intents).

Bug: 2559083
Change-Id: I56f6e745f8574aa17e28feaa9d2118fb4a715cd4
2010-04-23 12:37:23 -04:00
Joe Onorato d65d08e709 Fix race in LauncherModel that causes it to show duplicate icons.
Change-Id: I78130d6f237f476bc33a4718ca5ef245fe502857
2010-04-21 11:43:04 -04:00
Daniel Sandler cbe7f20ad7 Move batch size to a resource.
This way we can figure out how many apps to send to the grid
at a time even if the grid hasn't been instantiated yet.

Bug: 2599979
Change-Id: I7960fe1adae6976555334422335f3a4b28d0675e
2010-04-19 14:47:18 -04:00
Joe Onorato effc4a8aef Paper over bug 2592956 - Home not redrawing the shortcuts, widgets, or background.
The mNext* stuff in AllApps3D got reset when onNewIntent came in too fast after an
onCreate, which happened because of the configuration changed.

Change-Id: I9a358b6969ac1d17ea98f58218d47bfe983936f0
2010-04-15 11:51:38 -07:00