From b0dd5cc7b235bf6e0aa59e83a58b1e902a2ff372 Mon Sep 17 00:00:00 2001 From: Mohammadinamul Sheik Date: Wed, 12 Aug 2015 10:43:37 -0700 Subject: [PATCH] Fix the ellipses image scaling of LatinIME Bug: 23082844 Change-Id: I7baac5e5a0700280906fd0f5f9351fc8dfc4c2b3 (cherry picked from commit 990e9a75b6d88ba234131612f11eac6b69c1cf84) --- .../latin/suggestions/SuggestionStripLayoutHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index d8926ffba..9577d0913 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -191,7 +191,9 @@ final class SuggestionStripLayoutHelper { final Bitmap buffer = Bitmap.createBitmap(width, (height * 3 / 2), Bitmap.Config.ARGB_8888); final Canvas canvas = new Canvas(buffer); canvas.drawText(MORE_SUGGESTIONS_HINT, width / 2, height, paint); - return new BitmapDrawable(res, buffer); + BitmapDrawable bitmapDrawable = new BitmapDrawable(res, buffer); + bitmapDrawable.setTargetDensity(canvas); + return bitmapDrawable; } private CharSequence getStyledSuggestedWord(final SuggestedWords suggestedWords,