aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-05-20 00:42:13 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-20 00:42:13 -0700
commit29a4b1ac88b06ced0ceb0b36ec4aedb7692447f7 (patch)
tree0e1675dbbdb91bd84e1b4dfa54b8640dbdb1f8cc /tests/src
parent5d7f9da99ffae1589269566ebe19ae73c8324fc9 (diff)
parente896d31bb92146379c8b7c0050ee05eec0830317 (diff)
downloadlatinime-29a4b1ac88b06ced0ceb0b36ec4aedb7692447f7.tar.gz
latinime-29a4b1ac88b06ced0ceb0b36ec4aedb7692447f7.tar.xz
latinime-29a4b1ac88b06ced0ceb0b36ec4aedb7692447f7.zip
Merge "Reload keyboard after SoftInputWindow size changed"
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestHelper.java4
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestTestsBase.java5
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestHelper.java b/tests/src/com/android/inputmethod/latin/SuggestHelper.java
index 8a11ff955..87ea011fa 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestHelper.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestHelper.java
@@ -36,7 +36,7 @@ public class SuggestHelper {
// Use null as the locale for Suggest so as to force it to use the internal dictionary
// (and not try to find a dictionary provider for a specified locale)
mSuggest = new Suggest(context, dictionaryId, null);
- mKeyboard = new LatinKeyboard(context, keyboardId);
+ mKeyboard = new LatinKeyboard(context, keyboardId, keyboardId.mWidth);
mKeyDetector = new KeyDetector();
init();
}
@@ -44,7 +44,7 @@ public class SuggestHelper {
protected SuggestHelper(Context context, File dictionaryPath, long startOffset, long length,
KeyboardId keyboardId) {
mSuggest = new Suggest(context, dictionaryPath, startOffset, length, null);
- mKeyboard = new LatinKeyboard(context, keyboardId);
+ mKeyboard = new LatinKeyboard(context, keyboardId, keyboardId.mWidth);
mKeyDetector = new KeyDetector();
init();
}
diff --git a/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java b/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
index 64f26743e..cf4ccfeaa 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestTestsBase.java
@@ -38,10 +38,11 @@ public class SuggestTestsBase extends AndroidTestCase {
mTestPackageFile = new File(getTestContext().getApplicationInfo().sourceDir);
}
- protected static KeyboardId createKeyboardId(Locale locale) {
+ protected KeyboardId createKeyboardId(Locale locale) {
+ final int displayWidth = getContext().getResources().getDisplayMetrics().widthPixels;
return new KeyboardId(locale.toString() + " keyboard",
com.android.inputmethod.latin.R.xml.kbd_qwerty, KeyboardView.COLOR_SCHEME_WHITE,
- locale, Configuration.ORIENTATION_LANDSCAPE, KeyboardId.MODE_TEXT,
+ locale, displayWidth, Configuration.ORIENTATION_LANDSCAPE, KeyboardId.MODE_TEXT,
new EditorInfo(), false, false, false, false);
}