aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-10-16 13:26:45 -0700
committerTadashi G. Takaoka <takaoka@google.com>2012-10-16 14:24:30 -0700
commitbdc8b9e42b90e1fdf8e15d7ee5c0d319934fec0a (patch)
treee9cf5cdb49e9f26bcf46152079957faf14950e5e /java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
parentc1bcb8ee104fd256cfda2d11b38336c9b3b3a0d3 (diff)
downloadlatinime-bdc8b9e42b90e1fdf8e15d7ee5c0d319934fec0a.tar.gz
latinime-bdc8b9e42b90e1fdf8e15d7ee5c0d319934fec0a.tar.xz
latinime-bdc8b9e42b90e1fdf8e15d7ee5c0d319934fec0a.zip
Fix more suggestions text width calculation
Bug: 7345983 Change-Id: Ic1554db98e7aaf032eb90a98c0c37c7c789461b5
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java')
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
index e9bf0fac4..4e9fd1968 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
@@ -51,10 +51,11 @@ public final class MoreSuggestions extends Keyboard {
super();
}
+ // TODO: Remove {@link MoreSuggestionsView} argument.
public int layout(final SuggestedWords suggestions, final int fromPos, final int maxWidth,
final int minWidth, final int maxRow, final MoreSuggestionsView view) {
clearKeys();
- final Resources res = view.getContext().getResources();
+ final Resources res = view.getResources();
mDivider = res.getDrawable(R.drawable.more_suggestions_divider);
mDividerWidth = mDivider.getIntrinsicWidth();
final int padding = (int) res.getDimension(
@@ -181,6 +182,7 @@ public final class MoreSuggestions extends Keyboard {
load(xmlId, keyboard.mId);
mParams.mVerticalGap = mParams.mTopPadding = keyboard.mVerticalGap / 2;
+ mPaneView.updateKeyboardGeometry(mParams.mDefaultRowHeight);
final int count = mParams.layout(suggestions, fromPos, maxWidth, minWidth, maxRow,
mPaneView);
mFromPos = fromPos;