aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-08-09 03:00:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-09 03:00:13 +0000
commit6ca0b371de557b21dab5736802055cc367036f8d (patch)
treef6adcca35f3270ba25c9cbc3112d1fd635dd0ea1 /java/src
parent5c057b32414fab5f5d8267f8fc8b4230b54d4cca (diff)
parent4f1fdc30be26fcd491a14ae2741d684ca2f24e26 (diff)
downloadlatinime-6ca0b371de557b21dab5736802055cc367036f8d.tar.gz
latinime-6ca0b371de557b21dab5736802055cc367036f8d.tar.xz
latinime-6ca0b371de557b21dab5736802055cc367036f8d.zip
Merge "Small clean up of KeyboardView.onMeasure"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardView.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 054c503d8..28eb58573 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -196,13 +196,14 @@ public class KeyboardView extends View {
@Override
protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {
- if (mKeyboard != null) {
- // The main keyboard expands to the display width.
- final int height = mKeyboard.mOccupiedHeight + getPaddingTop() + getPaddingBottom();
- setMeasuredDimension(widthMeasureSpec, height);
- } else {
+ if (mKeyboard == null) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ return;
}
+ // The main keyboard expands to the entire this {@link KeyboardView}.
+ final int width = mKeyboard.mOccupiedWidth + getPaddingLeft() + getPaddingRight();
+ final int height = mKeyboard.mOccupiedHeight + getPaddingTop() + getPaddingBottom();
+ setMeasuredDimension(width, height);
}
@Override