From 0ece2bcd0e5cb19a3f4493372d8fe3dd8f674233 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Tue, 12 May 2020 14:42:36 +0300 Subject: [PATCH] use setAutoMirrored for image flipping on API 19 and higher --- OsmAnd/src/net/osmand/AndroidUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/src/net/osmand/AndroidUtils.java b/OsmAnd/src/net/osmand/AndroidUtils.java index 5d3ce4b55d..10effe8363 100644 --- a/OsmAnd/src/net/osmand/AndroidUtils.java +++ b/OsmAnd/src/net/osmand/AndroidUtils.java @@ -703,6 +703,10 @@ public class AndroidUtils { public static Drawable getMirroredDrawable(@NonNull Context ctx, @NonNull Drawable drawable) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + drawable.setAutoMirrored(true); + return drawable; + } Bitmap bitmap = drawableToBitmap(drawable); return new BitmapDrawable(ctx.getResources(), flipBitmapHorizontally(bitmap)); }