[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
* [Android] Fix image problem antialiasing on Android 9
Browse files Browse the repository at this point in the history
  • Loading branch information
LHJ authored and YorkShen committed Jan 17, 2019
1 parent 744181b commit f921de0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public static Drawable createImageDrawable(@Nullable Drawable original,
(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);
Expand Down

0 comments on commit f921de0

Please sign in to comment.