Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 39bec9053dc95b74897bad9f17531c5ee505a3c1
Author: Nader Jawad <njawad@google.com>
Date: Mon Jun 24 16:10:48 2019
Created factory method for BlendMode Color Filter
Separated PaintCompat helper methods to enable creation of
a color filter with a provided color and BlendModeCompat parameter.
This factory will create either a BlendModeColorFilter or a
PorterDuffColorFilter based on capabilities of the given API level.
A BlendModeColorFilterCompat API is not feasible as the underlying
framework primitives are package private, so a static factory is
created instead.
Moved mapping logic out of PaintCompat into BlendModeUtils to be shared
between ColorFilterCompat and PaintCompat
Test: Updated PaintTest to leverage underlying ColorFilterCompat and
BlendModeUtils APIs
Bug: 135943149
Change-Id: Ifd99f8b406744e4e165d268d75fe650e89917e0b
M core/core-ktx/api/1.2.0-alpha03.txt
M core/core-ktx/api/current.txt
M core/core-ktx/src/main/java/androidx/core/graphics/Paint.kt
M core/core/api/1.2.0-alpha03.txt
M core/core/api/current.txt
A core/core/src/androidTest/java/androidx/core/graphics/BlendModeColorFilterCompatTest.java
M core/core/src/androidTest/java/androidx/core/graphics/PaintTest.java
A core/core/src/main/java/androidx/core/graphics/BlendModeColorFilterCompat.java
M core/core/src/main/java/androidx/core/graphics/BlendModeCompat.java
A core/core/src/main/java/androidx/core/graphics/BlendModeUtils.java
M core/core/src/main/java/androidx/core/graphics/PaintCompat.java
https://android-review.googlesource.com/987260
https://goto.google.com/android-sha1/39bec9053dc95b74897bad9f17531c5ee505a3c1
Branch: androidx-master-dev
commit 39bec9053dc95b74897bad9f17531c5ee505a3c1
Author: Nader Jawad <njawad@google.com>
Date: Mon Jun 24 16:10:48 2019
Created factory method for BlendMode Color Filter
Separated PaintCompat helper methods to enable creation of
a color filter with a provided color and BlendModeCompat parameter.
This factory will create either a BlendModeColorFilter or a
PorterDuffColorFilter based on capabilities of the given API level.
A BlendModeColorFilterCompat API is not feasible as the underlying
framework primitives are package private, so a static factory is
created instead.
Moved mapping logic out of PaintCompat into BlendModeUtils to be shared
between ColorFilterCompat and PaintCompat
Test: Updated PaintTest to leverage underlying ColorFilterCompat and
BlendModeUtils APIs
Bug: 135943149
Change-Id: Ifd99f8b406744e4e165d268d75fe650e89917e0b
M core/core-ktx/api/1.2.0-alpha03.txt
M core/core-ktx/api/current.txt
M core/core-ktx/src/main/java/androidx/core/graphics/Paint.kt
M core/core/api/1.2.0-alpha03.txt
M core/core/api/current.txt
A core/core/src/androidTest/java/androidx/core/graphics/BlendModeColorFilterCompatTest.java
M core/core/src/androidTest/java/androidx/core/graphics/PaintTest.java
A core/core/src/main/java/androidx/core/graphics/BlendModeColorFilterCompat.java
M core/core/src/main/java/androidx/core/graphics/BlendModeCompat.java
A core/core/src/main/java/androidx/core/graphics/BlendModeUtils.java
M core/core/src/main/java/androidx/core/graphics/PaintCompat.java
Description
It would be nice if we had a BlendModeColorFilterCompat that we could pass to setColorFilter(ColorFilter colorFilter) that did the right thing on each API level.