OSDN Git Service

FastBitmapDrawable can draw an icon badge (notification count)
authorTony Wickham <twickham@google.com>
Wed, 11 Jan 2017 17:53:12 +0000 (09:53 -0800)
committerTony Wickham <twickham@google.com>
Fri, 13 Jan 2017 18:58:10 +0000 (10:58 -0800)
commit9a8d11f930ced4c2706db150b7bbbb21330bd68d
tree836cd603e38d3cb17ae0a5950757b479639c6c85
parent19ea5cc0c853d48db59363f763d9a06c8691e00d
FastBitmapDrawable can draw an icon badge (notification count)

- 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
res/values/dimens.xml
src/com/android/launcher3/BubbleTextView.java
src/com/android/launcher3/DeviceProfile.java
src/com/android/launcher3/FastBitmapDrawable.java
src/com/android/launcher3/Utilities.java
src/com/android/launcher3/Workspace.java
src/com/android/launcher3/badge/BadgeInfo.java [new file with mode: 0644]
src/com/android/launcher3/badge/BadgeRenderer.java [new file with mode: 0644]
src/com/android/launcher3/graphics/IconPalette.java [new file with mode: 0644]