Bug: 188081026
Test: no op change, should compile
Test: ReorderWidgets
Change-Id: I20367974e5a4cead406e18eb66dafd4d59651b2a
Merged-In: I20367974e5a4cead406e18eb66dafd4d59651b2a
The wrapper class is created for further changes that will run the wrapped host in the background.
Test: N/A
Bug: 235358918
Change-Id: I9bd6fc2749c5d4a4d3391fb75d0c3ff1e13d17bf
I'm moving the LayoutParams to another file to start the decoupling
of the Reorder outside of the CellLayout.
Also, I change the name from LayoutParams to LauncherLayoutParams to prevent confusion with ViewGroup.LayoutParams making it explicit that this are different LayoutParams.
Bug: 188081026
Test: atest ReorderWidget
Change-Id: I92251c5540ffcf5ece7b933e6f6c836eb825c997
When activity restarts, the widgetView gets onDetachFromWindow first
which inturn removes the AppWidgetResizeFrame from drawLayer while
the dispatchAttachToWindow was still in progress in DragLayer
Bug: 238416508
Test: Verified no crash after the change
Change-Id: I6359840c9fb3ae2719056845818620af19d3c94d
These are review comments followup from ag/17399997
Bug: b/218187058
Test: manually test thet Launcher3 features work correctly
Change-Id: I9865a37c1ed663370dc28e7678994f3d961e3cd1
To fix it I added the following logic condition: if the minimum size of
the widget (`mMinVSpan` vertically) is equal to the maximum size of the
widget (`mMaxVSpan` vertically), then you can't change the size and the
handles shouldn't appear, I did this for both the horizontal handles as
well as the vertical handles.
Fix: 202004006
Change-Id: Ide05231f5712a736129ac6cb2fee358f7c70e371
Test: Manully veryfied.
Also updated the tests to check that the resize frame is shown.
Bug: 192655785
Test: AddWidgetTest, AddConfigWidgetTest, manual
Change-Id: Id348f39cec1bebc8ec9ea9f3068f4bda2159eac4
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.
Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
I referenced the code in Workspace.java that updates the widget view's
layout params before showing the resize frame.
Test: manual, AddWidgetTest and AddConfigWidgetTest tapl tests
Bug: 183437963
Change-Id: I6655917878fa22d6084b4bf39fc0661e7278d6f9
Show tip on reconfigurable widget in launcher.
Bug: 185354491
Test: Manually tested tips in widget picker, all apps, and
reconfigurable widgets tip.
Change-Id: I08154c944285cac6a21c3ef4aafd878bbbccf44b
Test: Pick up a widget from home screen. Then drop it and immediately
pick it up again before the resize frame is dismissed. No crash
is observed.
Bug: 186663184
Change-Id: Ia40676fbbf5d6dc2e2043aa7acd6ae00f1fa4179
> Simulating the windo wmanager API to get available device
profiles until final API
> When a device has multiple internal displays, and with both
tablet and phone possibilities, it uses a split workspace layout
Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
When forcing the rounded corners, the radius may be smaller than the
default one. When this happens, we should change how the frame is drawn
to only use that reduced radius, or this looks weird.
Bug: 183097166
Test: Manual tests with top 1P App Widgets
Change-Id: I6ce232515ce14059e1168e16735719ea2370132c
Currently, if you resize the widget to the top, bottom or right, the
resize frame disappears. This is because the AppWidgetResizeFrame code
relies on the indices of the child elements to find the drag handles.
I updated the code to instead use IDs since that is more robust.
Test: manual
Bug: 182305670
Change-Id: Iaa9d32c9190fb579101914f03d57bb48dcecb88d
This follow recommendations from the API council review.
Also removes two public functions introduced recently by
http://ag/13473552 and are not needed anymore.
Bug: 181611658
Test: Manual testing with local widget.
Change-Id: I8d0c90a80a0d45981bd5d16e69cd86639d5ec7d8
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.
Test: Automatic: Ran all robolectric tests in launcher3,
Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
* Added isScalable, minCellWidth, minCellHeight, and borderSpacing attrs
When isScalable is true, we use set workspace cell values to
minCellWidth/minCellHeight and then scale the cell values to
fit the available space. This allows us to have consistent
aspect ratios when two devices match the display/grid options.
This is different from the dynamic grid, which calculates
cell values based on iconSize/textSize/etc and then allows
the cell width to be as wide as space allows.
I adjusted some variables so that they will auto adjust
based on another value, indepenent from whether the
grid isScalable or not. An example of this is the folder
label text, where it's always set to be 1.14x of whatever
the workspace icon text size is. This is so we don't need
to add a bunch of more variables to DisplayOption/GridOption.
Bug: 175329686
Test: - switching between device profiles,
- testing folder open/close
- testing in multiwindow
- testing in landscape
Change-Id: Ia469ae0d65b518469ef264b726db46f4a3210056
Makes sure the launcher:
1 - Send the list of actual sizes the widget in all situations.
2 - Gives the current size to the framework on inflation.
Also needed to guard the new border changes introduced in
http://ag/13532637 with the corresponding flag.
Change-Id: I2a33e9501b921f2fc393684e8ce91ee077626bf7
Test: By hand using a local widget.
Bug: 179025145
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
all the "extra" space to three different variable height
areas.
* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.
Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
- test drag and drop still worked
- test reordering
- test widgets
- test folders
- test multiwindow
Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
LiveSearchManager creates AppWidgetHost when user starts a new search session and destroys it when user returns to home. In addition, it also manages the creation and caching of PlaceholderSearchWidget which can be used to create AppWidgetHostViews.
Bug: 168321831
Test: Manual
Change-Id: I06a893028e55aa6e0702a4f1cd7a2edbb1f61671
Updating various static objects to use a standard pattern so that
it is easier to track and cleanup those objects
Bug: 141376165
Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
Static dependency does not work in the presence of multiple activities and
when the main activity is not Launcher (eg in fallback recents). Instead
creating FirstFrameAnimatorHelper on demand for individual animations.
Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
(This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975)
Various animations were marked for cancellation when launcher activity is
destroyed. This this does not work with multiple activities (Launcher,
fallback recents, shortcut confirmation). Also since launcher activity
handles configuration changes, the activity is not destroyed often.
Instead associating a target with various animations which automatically
cancels the animations when that target goes away.
Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
Apply model updates as son as they arrive instead of waiting for onResume.
Various workspace items do not use any configuration dependent resources.
For Widgets, we wait until the host starts lietening before inflating the actual view.
Change-Id: Icb2f5e5940c1ce6c27062ccd34eff87e80af5ab1
even when the touch is started from outside the panel
Removing various instanceOf checks in onNewIntent and onBackPress
and moving all the corresponding logging in the FloatingView
This simplifies handling of panel specific log and avoids
missing a particular panel type in the if-else statement.
Bug: 64751884
Bug: 64751923
Change-Id: I98f5aae18560a64be73c9efcf495479740d49a00
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets
Change-Id: I0e278bc7dd415713029364060ef10842da990be9
> This ensures that LauncherAppState is only accessed in the presence of
a valid context
Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
In applyDeltaAndBound, we add the current IntRange values
+ delta param to the outbound IntRange -- but then we only
bind based on the current IntRange values, so the out IntRange
values can end be out of bounds.
Change-Id: Ibbaae8c2c2734107d1fd7ce8a59a4c66d83068ad
When a widget resizes in multi-window mode (ie. user is dragging
the resize frame), the frame is misaligned until the user lets go.
This is because the translation value to center fit the resized
widget is not taken into consideration.
Bug: 32176631
Change-Id: I6f9ee7be12d3266f021796576c771f86f6120246
The original animation assumed that the views are not
translated and not scaled. In multi-window mode this
assumption is no longer valid, because app widgets are
scaled and translated to fit center within their cells.
Bug: 32176631
Change-Id: Id60c793730d982277c9d91860e9fb0e6a0df7d38
Previous implementation had space between the frame and
the widget ie. letterboxing.
Bug: 32176631
Change-Id: Ie50279f4edb94812120dea492aefa4f18218162f
To keep this CL small and focused, I'm going to create
a separate CL that handles the scaling for the widget in
drag and drop mode.
Bug: 32176631
Change-Id: Id6557d070edb664aa1f4851de7abf494cf8a0677