summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/WidgetHostViewLoader.java
Commit message (Collapse)AuthorAgeFilesLines
* Simplifying drag preview generationSunny Goyal2017-09-271-1/+1
| | | | | | | | | > Fixing wrong icon normalization when dragging a folder icon > Reusing the preview bitmap for creating dragOutline > Generating drag outline on the background thread Bug: 35428783 Change-Id: I01e724ba63404302090ee1e562f6c2fc7147ba2f
* Fixing custom widgets support:Sunny Goyal2017-09-131-1/+1
| | | | | | | | > 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
* Improving widget handling for pinItemRequestSunny Goyal2017-01-271-3/+5
| | | | | | | | | | > Preloading widget view while dragging for smoother transition > Skipping config activity and sending confirmation to the caller when widget is dropped Bug: 33584624 Change-Id: Ib23e5964298296d12d9c93f38aefdf924a07368e
* Removing all compatibility code below LollipopSunny Goyal2016-12-161-24/+18
| | | | | Bug: 32745285 Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
* Smooth animation when dropping a widget in multi-window mode.Jon Miranda2016-12-141-1/+1
| | | | | | | | | | Factored in app widget scaling in methods related to estimating widget size and positions. ie. Dropping a widget that needs to be resized to fit in the workspace. Bug: 32176631 Change-Id: I106fe12041565a090047f146a07d4bc80a074b4a
* Some drag and drop code refactor:Sunny Goyal2016-09-011-1/+3
| | | | | | | | | 1) Adding DragOptions to easily extend drap functionality 2) Changing onDragStarted signature to send more information 3) Updating states for dropTargetButton based on drag event directly 4) Removing folder item based on onDragStarted and not startDrag Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
* Adding UI tests for various bind widget flowsSunny Goyal2016-03-151-5/+5
| | | | Change-Id: I634302051886baee6b6424f69bc95db860b4823e
* resolved conflicts for a8709ddb to ub-launcher3-masterTony Wickham2015-10-151-3/+24
|\ | | | | | | Change-Id: I172395e6e172914627b6dec721070a66520557b1
| * Fix "The specified child already has a parent" IllegalStateException.Tony Wickham2015-10-151-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was due to a race condition between removing a prebound widget view from the drag layer and adding the same view to the workspace upon dropping it; if you let go of the widget immediately after picking it up, the latter happened before the former. Specifically, the flow was: long-click a widget --> drop --> remove the view from the drag layer if it's not null (it is, so nothing happens) --> the view is finally bound/inflated and added to the drag layer --> add the view to the workspace --> already has a parent. There are actually 2 problems here: one is that the bind/inflate is asynchronous, and can therefore happen after dropping the widget view being inflated, and the other is that the view is added to the workspace even though the transition has barely started (we usually ignore drops if the transition is less than half complete). It turns out that this second problem was also due to a race condition, this time between dropping a widget or app onto the workspace and calling LauncherStateTransitionAnimation.dispatchOnLauncherTransitionStart(). If the drop happened before the dispatch, as in the case of the crash, then the drop was accepted because the transition progress was still 1.0 from the previous transition. I fixed the first problem by removing the drag layer widget view in Launcher where it is potentially used instead of Workspace. And I fixed the second problem by setting mTransitionProgress to 0 in Workspace.onLauncherTransitionPrepare(). I also added some debugging logs. Bug: 23896857 Change-Id: I66944e6d3f23b70dea15f7fb01af0763a1bfcbda
* | Moving drag-drop related code into a separate package.Vadim Tryshev2015-08-201-2/+2
| | | | | | | | | | | | | | | | | | 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
* | resolved conflicts for merge of 9fc953b9 to ub-launcher3-masterSunny Goyal2015-08-171-1/+2
|\| | | | | | | Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
| * Version code cleanupSunny Goyal2015-08-171-1/+2
| | | | | | | | | | | | | | | | > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
* | Refactoring ItemInfoSunny Goyal2015-06-301-1/+2
|/ | | | | | | | > Changing dragObject to ItemInfo > Removing dropPos which is always null > Removing requiresDbUpdate which is only used in CellLayout Change-Id: I753ddaae0880c8a9bfee5a1266095ff34610284a
* Fixing preloaded widget not getting used for animationSunny Goyal2015-06-021-100/+57
| | | | | | | | > The preloaded widget was being set in a different instance of PendingAddWidgetInfo and was never getting used for animation. bug: 20699153 Change-Id: Iaec13640e49c66993b4695e4a52dc3a3a2133fb2
* Removing some synthetic method creationSunny Goyal2015-06-021-2/+3
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Add drop animation / Toast to widgettrayHyunyoung Song2015-04-231-0/+197
- show instruction toast on clicking the widget - Add animation when widget drops on the workspace. Added WidgetHostViewLoader to handle short press and assign widget host view to enable animation b/19897708 Change-Id: Iec36d72cb21bf09343d0beeb31a09bf8b0cb5e0d