summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics
Commit message (Collapse)AuthorAgeFilesLines
* Simplifying some launcher themesSunny Goyal2017-02-163-6/+11
| | | | | | | > Replacing some colors with theme attributes > Simplifying styles definition by removing unnecessary inheritance and inlining some definitions Change-Id: Ifa167515cae6a7fd3720f1a52ff9ce11abb4495f
* Hide legacy icon treatment behind a flag.Hyunyoung Song2017-02-141-1/+1
| | | | Change-Id: I662f1317945e6dd175fd03dbabc264e45c18dcee
* Merge "Updating the default widget preview generation logic" into ↵Sunny Goyal2017-02-092-20/+13
|\ | | | | | | ub-launcher3-master
| * Updating the default widget preview generation logicSunny Goyal2017-02-082-20/+13
| | | | | | | | | | | | | | | | | | We draw a while round rect box which is divided into the cells to represent the widget size. The app icon is drawn in the center for this white box. Bug: 34819119 Change-Id: Ie4d83712577f21b276c6744a55993f71da368398
* | Add badges to foldersTony Wickham2017-02-071-0/+2
|/ | | | | | | | | - The folder badge contains the sum of the badge counts within. - This is represented by FolderBadgeInfo, a subclass of BadgeInfo. Bug: 34828806 Bug: 32410600 Change-Id: I977a69cc7baf80a7207af9adf98dddb0a3509c47
* Updating the PreloadIconDrawableSunny Goyal2017-02-066-29/+409
| | | | | | | | | > The drawable gets the path from MaskIconDrawable path, instead of using a circle > The progress changes are animated as well Bug: 34831873 Change-Id: I4e7f0b610f4fd94de8e0cfcf8b179b775cf0b4d8
* Changes required to use MaskableIconDrawable inside Launcher3Hyunyoung Song2017-01-301-6/+23
| | | | | | | | | | | | | This CL will bake the legacy icons inside a grey background Note: There will be follow up CL to change the color and shadow of the legacy icon. The idea of this CL is to first test if MaskableIconDrawable methods and class work properly. Bug: 32063838 Bug: 33553066 Change-Id: I3d02e619fcb0cd9879baa22a025b5d95c829f26c
* Ensure notification icons have enough contrast with background.Tony Wickham2017-01-271-0/+102
| | | | | | | | | This uses the same color calculations as the system, except that we use the extracted notification background instead of assuming it is white. Bug: 32410600 Change-Id: I7be8b9459ca38d01a6780758898541e69ec42576
* Add swipe-to-dismiss notifications in popup menu.Tony Wickham2017-01-251-1/+3
| | | | | | | | | | | | | | - Next secondary icon animates up to replace dismissed main notification - Add padding around main notification so it always aligns with the straight edges of the view (not the rounded corners); looks more dismissable - Notification view collapses as notifications are dismissed - To mimic system notification behavior, we copy SwipeHelper, FlingAnimationUtils, and Interpolators. We also apply elevation to notifications and reveal a darker color beneath when dismissing. Bug: 32410600 Change-Id: I9fbf10e73bb4996f17ef061c856efb013967d972
* Updating widget preview generation to not embed any badge.Sunny Goyal2017-01-191-0/+57
| | | | | | | | | Instead drawing badge in the view directly. This will allow us to reuse the same preview when we do not want to draw badges. This also simplified badging of shortcut config activities. Change-Id: I9c07c33bf9c2b8ef81a00026b1d42587868c906f
* Merge "Moving icon generation out of ShortcutInfo constructor so that it can ↵Sunny Goyal2017-01-181-0/+47
|\ | | | | | | be created on the UI thread" into ub-launcher3-master
| * Moving icon generation out of ShortcutInfo constructor so that itSunny Goyal2017-01-181-0/+47
| | | | | | | | | | | | can be created on the UI thread Change-Id: If84e52041eb4ab20807f5cfd4b7f31d7b5f381ed
* | Merge "FastBitmapDrawable can draw an icon badge (notification count)" into ↵Tony Wickham2017-01-181-0/+63
|\ \ | |/ |/| | | ub-launcher3-master
| * FastBitmapDrawable can draw an icon badge (notification count)Tony Wickham2017-01-131-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | - Added BadgeInfo to contain data to be shown in a badge (currently just notification count). - Added BadgeRenderer in DeviceProfile to contain things relevant to drawing the badge, such as size and Paint's. - Added IconPalette to compute colors for the badge based on a dominant color (will also be used for notifications) - FastBitmapDrawable uses these classes to draw the badge. Bug: 32410600 Change-Id: I6595a4879943357590f7d20c22594691a573ecaf
* | Merge "Use MaskableIconDrawable only in dogfood builds" into ub-launcher3-masterHyunyoung Song2017-01-131-0/+18
|\ \
| * | Use MaskableIconDrawable only in dogfood buildsHyunyoung Song2017-01-121-0/+18
| | | | | | | | | | | | | | | Bug: 32063838 Change-Id: Id0d15c4fff54b9429dbe5f9ee7ef26fd9cf8703d
* | | Removing static Context access using LauncherAppStateSunny Goyal2017-01-113-21/+18
| |/ |/| | | | | | | | | | | | | > This ensures that LauncherAppState is only accessed in the presence of a valid context Bug: 33032833 Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
* | Merge "Creating AllAppsBackgroundDrawable using DrawableFactory to allow ↵Sunny Goyal2017-01-111-0/+5
|\ \ | | | | | | | | | easier overriding using derivative projects" into ub-launcher3-master
| * | Creating AllAppsBackgroundDrawable using DrawableFactory to allowSunny Goyal2017-01-081-0/+5
| |/ | | | | | | | | | | easier overriding using derivative projects Change-Id: I7265d888876ea0928391f76ec1bcb7d928c0f27a
* / Refactoring some loadWorkspace logic in a separate classSunny Goyal2017-01-101-12/+0
|/ | | | | Bug: 34112546 Change-Id: I8a43ed1646056aa1957ac3d6ea82018691df6386
* Merge "Fix widget reorder animations in multi-window mode." into ↵Jonathan Miranda2016-12-301-7/+3
|\ | | | | | | ub-launcher3-master
| * Fix widget reorder animations in multi-window mode.Jon Miranda2016-12-201-7/+3
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Removing all compatibility code below Lollipop" into ub-launcher3-masterSunny Goyal2016-12-291-7/+1
|\ \
| * | Removing all compatibility code below LollipopSunny Goyal2016-12-161-7/+1
| |/ | | | | | | | | Bug: 32745285 Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
* / Fix clipping of drag outline by increasing padding.Jon Miranda2016-12-201-10/+18
|/ | | | | | | Low resolution will be addressed in future CL. Bug: 31915722 Change-Id: I6bdd32b7a30819fde1f15473a63ac280029b6715
* No more UserHandleCompatSunny Goyal2016-12-151-5/+6
| | | | | Bug: 32745285 Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
* Ensuring that ShortcutInfo always has an iconSunny Goyal2016-12-131-4/+4
| | | | | | | | | > Making iconBitmap public instead of a getter (similar to AppInfo) > Removing getIcon() which can lead to IO on UI thread > Removing updateIcon and handling the update at the caller Bug: 21325319 Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
* Adding a generic method to initiate overridable objectsSunny Goyal2016-12-121-19/+3
| | | | Change-Id: Ia433427c65ad38804f2eed9c6bc209df232758c0
* Merge "Scale widgets when dragging and dropping in multi-window mode." into ↵Jonathan Miranda2016-12-081-10/+49
|\ | | | | | | ub-launcher3-master
| * Scale widgets when dragging and dropping in multi-window mode.Jon Miranda2016-12-081-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change mimics the non-MW mode behavior when dragging and dropping widgets by taking the app widget scale into consideration. This ensures a consistant drag and drop experience between MW mode and non-MW mode. * Uses cell data (cell height/width, spanX/Y) to get the expected widget sizes. * Scales sizes when necessary. Bug: 32176631 Change-Id: Icdaf73ecd89a30e57fe7f405292d793f2d6a3ee8
* | Adding an overridable DrawableFactory to allow creating custom icon drawablesSunny Goyal2016-12-071-0/+69
|/ | | | | | > Adding ItemInfo as a parameter for creating drawable Change-Id: I793acb0381d2b8df4db0a08317dddf1464788ebc
* Simplifying fast scroller logicSunny Goyal2016-10-101-15/+7
| | | | | | | | | | | > Using a separate view for drawing the popup. This allows us to use elevation property instead of drawing the shadow as bitmap. > During the thumb animation, invalidating the full track width, instead of invalidating the track and thumb separately. > The thumb path is calculated at 0,0 and drawn using canvas.translate(). This avoids recalculating the path on every scroll. Change-Id: I48741e5b4432df0d939016db284d7aaf52cc2aa6
* Code sanitizationHyunyoung Song2016-10-062-12/+12
| | | | | | - Removed bad method/class name typos Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
* Moving some image handling classes to .graphics packageSunny Goyal2016-09-024-2/+738
| | | | Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
* Some optimizations in blur outline generatorSunny Goyal2016-09-021-5/+2
| | | | | | | | | 1) Using ALPHA_8 as the start and end bitmap. This removes one extra bitmap generation step 2) Using ByteBuffer on ALPHA_8 bitmap for clipAlpha. This allows us to use byteArray instead of intArray for representing pixels Change-Id: I1b654c439fd491b6b91180ddc562bb97fad857aa
* Moving the state changes during drag-n-drop from startDrag to onDragStartSunny Goyal2016-08-151-0/+11
| | | | | | | This will allow drag controller to optinally defer drag, based on some threshold, by simply deferring the callback onDragStart Change-Id: I17c06a15e2092b9797c7e57529b12a53d2acae6e
* Launcher shortcuts animations update.Sunny Goyal2016-07-272-95/+11
| | | | | | | | | | | > The shortcut container closes with an animation > When opening/closing the animation only the icon scales and not the title and drag handle > When dragging the icon, it starts from the original icon position and moves under the user finger. The container grows to follow the drag view. Bug: 28980830 Change-Id: Ic0353c30b682d1f018cbf4d62e8a6e8e7d7d4664
* Add arrow view to deep shortcuts container.Tony2016-07-261-0/+56
| | | | | | | | | - We create a trangular path, which we use as the view's outline (for the shadow) and as its PathShape background. - We scale up the arrow as the container opens. Bug: 28980830 Change-Id: I71e566552f063dfdb69067bb7e3cee659988f934
* Updating the search hint to contain the icon as a span object.Sunny Goyal2016-07-221-0/+62
| | | | | | | | | This makes the icon part of the hint text, and removes any need for custom focus event handling. Also the icon will now appear at the start of the text based on the direction of the text and not the direction of the layout Change-Id: I06c5cf99492d75b1005c69ec7c521cde0fdab010
* Increasing the size of the drag icon when a shortcut is draggedSunny Goyal2016-07-212-0/+244
| | | | Change-Id: I7d768657300d3229e05d1eb18aec3720a9098ffc
* Adding support for dynamically adding shadows to the iconSunny Goyal2016-07-201-0/+114
Change-Id: I94d98750aea1faef8879e25990aa5c41a4894708