diff options
author | 2011-09-22 19:29:58 +0900 | |
---|---|---|
committer | 2011-09-26 10:25:49 +0900 | |
commit | 8fbfac4ffb7079e8e71fd4e3ddc04e362239ebb3 (patch) | |
tree | bb7441453c6dff3f98220d3dc3d712905fbc7a25 /java/src/com/android/inputmethod/latin/MoreSuggestions.java | |
parent | 8d6fd877c5ac11aa0852b5a28bf1a52081ae9157 (diff) | |
download | latinime-8fbfac4ffb7079e8e71fd4e3ddc04e362239ebb3.tar.gz latinime-8fbfac4ffb7079e8e71fd4e3ddc04e362239ebb3.tar.xz latinime-8fbfac4ffb7079e8e71fd4e3ddc04e362239ebb3.zip |
Fix keyboard row height calculation
The keyboard height will be distrubuted as:
top_padding + (key_height + vertical_gap) * row_count - vertical_gap + bottom_padding
Change-Id: I841f356b9dbf8cfaf3756178bc9e4e6b2aa61364
Diffstat (limited to 'java/src/com/android/inputmethod/latin/MoreSuggestions.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/MoreSuggestions.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/MoreSuggestions.java index 24011c41e..1afa07214 100644 --- a/java/src/com/android/inputmethod/latin/MoreSuggestions.java +++ b/java/src/com/android/inputmethod/latin/MoreSuggestions.java @@ -92,8 +92,9 @@ public class MoreSuggestions extends Keyboard { } mNumColumnsInRow[row] = pos - rowStartPos; mNumRows = row + 1; - mWidth = mOccupiedWidth = Math.max(minWidth, calcurateMaxRowWidth(fromPos, pos)); - mHeight = mOccupiedHeight = mNumRows * mDefaultRowHeight + mVerticalGap; + mBaseWidth = mOccupiedWidth = Math.max( + minWidth, calcurateMaxRowWidth(fromPos, pos)); + mBaseHeight = mOccupiedHeight = mNumRows * mDefaultRowHeight + mVerticalGap; return pos - fromPos; } @@ -149,7 +150,7 @@ public class MoreSuggestions extends Keyboard { public int getWidth(int pos) { final int numColumnInRow = getNumColumnInRow(pos); - return (mWidth - mDividerWidth * (numColumnInRow - 1)) / numColumnInRow; + return (mOccupiedWidth - mDividerWidth * (numColumnInRow - 1)) / numColumnInRow; } public int getFlags(int pos) { |