summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/WidgetsListAdapter.java
Commit message (Collapse)AuthorAgeFilesLines
* Add support for system shortcuts in popup containerTony Wickham2017-03-301-1/+22
| | | | | | | | | | | | - Currently the system shortcuts are just widgets and app info - As shortcuts, they live in ShortcutsItemView - They are populated either as icons only (if there are deep shortcuts) or as icons + text - Widgets are disabled until binding them is complete (we request for them to be bound on long-press now). We should revisit this. Bug: 34940468 Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
* Updating widget tray themeSunny Goyal2017-02-091-17/+27
| | | | | | | | | | Using standard theme attributes rather than custom color codes, so that it plays nice with system theme changes. Bug: 34819119 Bug: 34897402 Bug: 21446746 Change-Id: I265fba3ceae8873650fd09e4704838d313155e83
* Using WidgetCell in the Pin Item confirmation prompt for a consistent UISunny Goyal2017-01-201-6/+0
| | | | | | | Also fixing some platform API changes in PinItemRequestCompat Bug: 33584624 Change-Id: I255829f0079f1a3967bf8d6a337da12c890eb7ec
* Removing static Context access using LauncherAppStateSunny Goyal2017-01-111-1/+1
| | | | | | | | > This ensures that LauncherAppState is only accessed in the presence of a valid context Bug: 33032833 Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
* Removing all compatibility code below LollipopSunny Goyal2016-12-161-9/+1
| | | | | Bug: 32745285 Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
* Fixing static instance of Indexer being created in the modelSunny Goyal2016-10-191-10/+46
| | | | | | | | | | | | Indexer depends on the locale and should be created when ever the config changes. Moving the widget indexing to the adapter (similar to allApps) which gets created whenever the activity is recreated. This fixes the bug where widgets indexing breaks if locale changes while launcher process is alive Also fixing the bug in widget model cloning where the HashMap was not cloning the underlying ArrayList Change-Id: I7dbe6290e73299c4c07aa7fa564077a2649e1a4c
* Removing the section break UI supportSunny Goyal2016-10-131-2/+0
| | | | | | | This was an exploration for an alternative UI in all apps, where we show section headers before every section. This was never released. Change-Id: I2d36f1d078cc9a6f3ba6f0ec9655412182c9b016
* Update Launcher to use theme colors.Andrew Sapperstein2016-06-201-4/+4
| | | | | | | | | | | | | | | | | | | Instead of using hard-coded variants of colors, use the theme color that corresponds (colorAccent, colorPrimary, etc). Updated: - "Search for more apps" text - App info drop target hover color - PageIndicatorDots - All apps & widget scroll bar & scroll popup colors - All apps section text color - widget picker background color TODO: - widget picker header color BUG: 28625102 Change-Id: I74b543ff71b8caef8cd950c8183ac84c759cb4d5
* Storing the widget item views in Widget holder, to avoid looks on every ↵Sunny Goyal2016-05-191-25/+11
| | | | | | bind/recycle Change-Id: Ifad34f419b1b4f2bf97cc4ff533277867598a719
* Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfoSunny Goyal2016-03-181-17/+3
| | | | | | | In PackageItemInfo,, using the user of the first item in the sub-list Bug: 27585511 Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
* Adding UI tests for various bind widget flowsSunny Goyal2016-03-151-1/+1
| | | | Change-Id: I634302051886baee6b6424f69bc95db860b4823e
* Manual revert due to conflict:Hyunyoung Song2016-02-231-6/+10
|\ | | | | | | | | | | | | am: d31dcbcc7c * commit 'd31dcbcc7c7901959c65c4e635e59274a1d4c334': Manual revert due to conflict:
| * Manual revert due to conflict:Hyunyoung Song2016-02-231-6/+10
| | | | | | | | | | | | | | | | Revert "Load label in bg thread to prevent ANR b/27238970" This reverts commit b62fd0957607ae54c7bca7ce64eed288a11f0f2f. Change-Id: Ia751e3414fb24a18bb8bb9ca09dcd93d0e4249f6
* | Disabling som attributes so that dependencies can use compat librariesSunny Goyal2016-02-231-0/+3
|\| | | | | | | | | | | | | am: e1bd986d77 * commit 'e1bd986d77afc9426e320b7cce53993086f9d8ba': Disabling som attributes so that dependencies can use compat libraries
| * Disabling som attributes so that dependencies can use compat librariesSunny Goyal2016-02-231-1/+3
| | | | | | | | | | Bug: 27101533 Change-Id: I18de77cffbbb234f25fb85dfe0334ed7fe113a74
| * Load label in bg thread to prevent ANRHyunyoung Song2016-02-231-13/+6
| | | | | | | | | | | | | | b/27238970 Change-Id: Ic5d77df7d5276cee07861d59427a94fb19691d9c (cherry picked from commit 72a9953cf463e0e7a8d24903f1692828ffe5b017)
* | Load label in bg thread to prevent ANRHyunyoung Song2016-02-221-13/+6
| | | | | | | | | | | | b/27238970 Change-Id: Ic5d77df7d5276cee07861d59427a94fb19691d9c
* | General code refactoringSunny Goyal2015-08-201-15/+4
| | | | | | | | | | | | | | | | | | > Removing utility method for isAttachedToWindow > Moving logic to calculate cell size from workspace to DeviceProfile > Replacing some constants with xml resource variables > Saving the item info using content values for better compatibility with other methods Change-Id: Idd612633d97a6241cb31148df9466031374bd5a0
* | resolved conflicts for merge of 9fc953b9 to ub-launcher3-masterSunny Goyal2015-08-171-1/+1
|\| | | | | | | Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
| * Version code cleanupSunny Goyal2015-08-171-1/+1
| | | | | | | | | | | | | | | | > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
* | Removing some eclipse warningsSunny Goyal2015-08-171-1/+0
|/ | | | Change-Id: I160feaee81b262be02446885fae643c0be71b7af
* Remove NPE inside WidgetsListAdapter during monkey actor testHyunyoung Song2015-07-271-0/+3
| | | | | | b/22518383 Change-Id: I1a683c49be93af150f7873390b723cee0d4ac5df
* Widget row should not be cut off on the right, when there is an indentHyunyoung Song2015-07-141-4/+6
| | | | | | b/22483452 Change-Id: I9d1cd8b71f4b6a4f75af420e9f54b73e9ae7527c
* Remove DEBUG flag inside WidgetsListAdapterHyunyoung Song2015-06-171-1/+1
| | | | Change-Id: I7e5b3162f2b3768caff7ff79fd75567a793a1f45
* Move fast scrolling logic to BaseRecyclerViewHyunyoung Song2015-05-291-1/+0
| | | | | | | | | | - This change has no effect on actual functionality but to make it easier for widget tray to inherit the goodness of the 1) fast scroller functionality 2) unify the scroll look and feel with the all apps view b/21375339 Change-Id: Ib859b1c3352c0b69f16549ded8f20eb82cf58ba8
* Refactoring DeviceProfileAdam Cohen2015-05-211-7/+6
| | | | | | | | | | | | | | | | | | | | -> Pulling out the parts of device profile which can (and need to be) initialized and accessed without access to an Activity context, ie. the invariant bits. -> The invariant bits are stored in InvariantDeviceProfile which is initialized statically from LauncherAppState. -> The DeviceProfile contains the Activity context-dependent bits, and we will create one of these for each Activity instance, and this instance is accessed through the Launcher activity. -> It's possible that we can continue to refactor this such that all appropriate dimensions can be computed without an Activity context (by only specifying orientation). This would be an extension of this CL and allow us to know exactly how launcher will look in both orientations from any context. Sets the stage for some improvements around b/19514688 Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
* Load PackageItemInfo in background thread to prevent ANRHyunyoung Song2015-05-211-0/+2
| | | | | | | | | | | - Decoupled widget model from widget view, and placed the creation to LauncherModel. - As a result packagemanager operation, iconcache retrieval is all done inside LauncherModel on background thread b/21311085 b/21325319 Change-Id: I294698527db58b89f3da558090a367530c058776
* Removing override annotation to fix build.Winson Chung2015-05-201-1/+0
| | | | Change-Id: I5a4dfa339db7862ac3db4cc379469ac8d9f6fae5
* Widget cell improvementSunny Goyal2015-05-191-6/+4
| | | | | | | | | > Using a custom view for preview, instead of extensing image view > Preventing relayout when applying preview > Removing unnecessary method calls Bug: 21133230 Change-Id: Iab12fa1e5c871ee43a9fb0e6b6af897fecfb345f
* Reducing calls to onCreateViewHolder due to animating children.Winson Chung2015-05-151-0/+9
| | | | | Bug 21133230 Change-Id: Ib5be0766d1ea56976195e33526d7595a16672eef
* Removing some dead code and extra view creation.Winson Chung2015-05-151-5/+4
| | | b/21133230
* Merge "Place the work profile badge in the correct bottom right (left for ↵Hyunyoung Song2015-05-151-1/+1
|\ | | | | | | RTL) location" into ub-launcher3-burnaby
| * Place the work profile badge in the correct bottom right (left for RTL)Hyunyoung Song2015-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | location Also: - clean up of some code - remove requestLayout() method call that is not needed. b/20338602 Change-Id: I65e0e1ac40da2e3fa85af4d3aca54bed3f200a99
* | Various lint error fixes.Sunny Goyal2015-05-141-4/+8
|/ | | | | | | | > Fixing some RTL errors by specifying both marginStart and marginLeft > Moving all layout direction checks to Utilities > Explicitely adding @TargetApi before every method Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
* Typecast to correct LayoutParamsHyunyoung Song2015-05-121-3/+4
| | | | Change-Id: Ifdd04923563a0ef57bd281d1b55b8af0e4cc59f0
* Fixing several layout issues.Hyunyoung Song2015-05-121-10/+29
| | | | | | | | | | | | | | - N7/N9 indented area should not block scroll view - separator at the end of the widget cell should not show up on the last item. Not covered in this CL: - Guarantee that last item is showing only 20~40%. Right now, the hand picked constant works for N5,6,7,9 b/20338324 b/20763871 Change-Id: I274ab95c6c3e2fc8be8ceafb2e8172c0174a41a5
* Using BubbleTextView for widget section headersSunny Goyal2015-05-121-13/+4
| | | | | | > Loading highres icons on the worker thread. Change-Id: I5b68a86820aa4c132c156339e497354cf57f0fca
* Ensure that clipping widget size is 20~40% of its width on every devicesHyunyoung Song2015-05-111-0/+10
| | | | | | | b/20338324 b/20763871 Change-Id: I69114cb6dfec95c473313a440a6db76a052e5601
* Removes code that is incompatible with google3, Velvet build rules.Hyunyoung Song2015-04-301-4/+0
| | | | Change-Id: Ibce31b52f5ffc4a03bdd48c575521c774f17a353
* WidgetPreviewLoader concurrency issue / Caching improvementHyunyoung Song2015-04-281-3/+9
| | | | | | | | | | | | | | 1) Concurrency issue: unused bitmap was not properly synchronized which caused concurrency issue. Hence, leading current widget tray implementation to not use it. (a.k.a. cancel(false)). Issue fixed and now using the unused bitmap pool. 2) Caching improvement: LoadedBitmap cache was a legacy support system for the old widget tray implementation. On our latest implementation, cache and recycled view is completely being managed by the recycler view. Hence removed. Change-Id: I843e6a286b676f283172f2c1ef5cbeed0a9fb17f
* Widget tray alignment according to UX specHyunyoung Song2015-04-271-1/+10
| | | | | | | | | - Fixing an issue where widget preview is not loaded do to faulty canceling of loading async task when view is detached from the window. b/20338334 Change-Id: I1e3bd6b6cdafda8d1e0a7a0e87c8089100c341a7
* Add drop animation / Toast to widgettrayHyunyoung Song2015-04-231-5/+0
| | | | | | | | | | | - 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
* WidgetTray improvementHyunyoung Song2015-04-131-21/+9
| | | | | | | | | | | | | | | | | | UI - Fixing the issue of widget row not rendering - Moved the resetting of previous bitmap to the start of onBind instead of the onDetachedWindow. Performance - WidgetModel do not have to keep packageName list around. Will com in immediate follow up CLs - use lowRes widgets bitmap before fully loading the fullRes one. - application icons are fully loaded in background thread. b/19897708 Change-Id: I5b3b43a5c543a5135c395f90df32e66d57dc86e0
* WidgetTray UI improvementHyunyoung Song2015-04-091-0/+1
| | | | | | | | | | - Long application title should be ellipsized - Disable the drawable when the view is no longer attached to the window - Save the PackageItemInfo to the WidgetModel once full res icon bitmap is loaded b/19897708 Change-Id: I96f260f9d165b206905a127fcee9879556c3d0c4
* WidgetTray revamp workHyunyoung Song2015-04-081-0/+188
- RecyclerView is rendering - Animation is connected - Drag and drop is now handled - UI tweaking: background, margins, more to come. - Flicker and preview not loading issue: fixed height for the horizontal scroll view. - Shortcuts are added - Widget Preview loading should support shortPress for drop - UI tweaks left: overlay of arrow when there are more items to scroll - icons are added in the section header - Sorting of widget sections and widget horizontal list - Adding all the padding constants to dimen.xml file - RecyclerView should only support one view type For items to be addressed in follow up patches OR CLs, TODO is added to the comment. b/19897708 Change-Id: Ibfc4da1696a23d20bada93db46e126706eb13cdc