You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/01/17 06:35:23 UTC
[incubator-weex] branch master updated: * [Android] Fix image
problem antialiasing on Android 9
This is an automated email from the ASF dual-hosted git repository.
kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new f921de0 * [Android] Fix image problem antialiasing on Android 9
f921de0 is described below
commit f921de08f73f29763381d6fd56cda153cb0c1369
Author: LHJ <ha...@qq.com>
AuthorDate: Thu Jan 17 14:35:17 2019 +0800
* [Android] Fix image problem antialiasing on Android 9
---
android/sdk/src/main/java/com/taobao/weex/utils/ImageDrawable.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/ImageDrawable.java b/android/sdk/src/main/java/com/taobao/weex/utils/ImageDrawable.java
index f3ee939..f6f1010 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/ImageDrawable.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/ImageDrawable.java
@@ -49,6 +49,8 @@ public class ImageDrawable extends PaintDrawable {
(bm = ((BitmapDrawable) original).getBitmap()) != null) {
ImageDrawable imageDrawable;
imageDrawable = new ImageDrawable();
+ // fix android 9 image antialiasing
+ imageDrawable.getPaint().setFilterBitmap(true);
imageDrawable.bitmapWidth = bm.getWidth();
imageDrawable.bitmapHeight = bm.getHeight();
BitmapShader bitmapShader = new BitmapShader(bm, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);