aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-01-24 01:46:26 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-24 01:46:26 -0800
commit8972b9ea1f08c4bb38b06e4c47332d102567a5b2 (patch)
treec973f167cbb4bbcb06d1fe692bdef30303741963 /java/src/com/android/inputmethod/latin/LatinIME.java
parent12a339dd2e85c60313986ba44a7143fe62c134f4 (diff)
parent603e72baa26813d47e32b9c274268384e30d7317 (diff)
downloadlatinime-8972b9ea1f08c4bb38b06e4c47332d102567a5b2.tar.gz
latinime-8972b9ea1f08c4bb38b06e4c47332d102567a5b2.tar.xz
latinime-8972b9ea1f08c4bb38b06e4c47332d102567a5b2.zip
am 603e72ba: Merge "Implement callback to handle touch event outside SoftInputWindow" into honeycomb
* commit '603e72baa26813d47e32b9c274268384e30d7317': Implement callback to handle touch event outside SoftInputWindow
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java28
1 files changed, 19 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index bbe3f78f2..198d34f4a 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -161,6 +161,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private int mConfigDelayBeforeFadeoutLanguageOnSpacebar;
private int mConfigDurationOfFadeoutLanguageOnSpacebar;
private float mConfigFinalFadeoutFactorOfLanguageOnSpacebar;
+ // For example, to deal with status bar on tablet.
+ private int mKeyboardBottomRowVerticalCorrection;
private int mCorrectionMode;
private int mCommittedLength;
@@ -377,6 +379,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
R.integer.config_duration_of_fadeout_language_on_spacebar);
mConfigFinalFadeoutFactorOfLanguageOnSpacebar = res.getInteger(
R.integer.config_final_fadeout_percentage_of_language_on_spacebar) / 100.0f;
+ mKeyboardBottomRowVerticalCorrection = (int)res.getDimension(
+ R.dimen.keyboard_bottom_row_vertical_correction);
Utils.GCUtils.getInstance().reset();
boolean tryGC = true;
@@ -569,6 +573,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mVoiceConnector.onStartInputView(inputView.getWindowToken());
+ if (mKeyboardBottomRowVerticalCorrection > 0) {
+ final Window window = getWindow().getWindow();
+ if (!(window.getCallback() instanceof ClipTouchEventWindowCallback)) {
+ window.setCallback(new ClipTouchEventWindowCallback(
+ window, mKeyboardBottomRowVerticalCorrection));
+ }
+ }
+
if (TRACE) Debug.startMethodTracing("/data/trace/latinime");
}
@@ -883,15 +895,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (mCandidateViewContainer != null) {
ViewParent candidateParent = mCandidateViewContainer.getParent();
if (candidateParent instanceof FrameLayout) {
- FrameLayout fl = (FrameLayout) candidateParent;
- if (fl != null) {
- // Check frame layout's visibility
- if (fl.getVisibility() == View.INVISIBLE) {
- y = fl.getHeight();
- height += y;
- } else if (fl.getVisibility() == View.VISIBLE) {
- height += fl.getHeight();
- }
+ final FrameLayout fl = (FrameLayout) candidateParent;
+ // Check frame layout's visibility
+ if (fl.getVisibility() == View.INVISIBLE) {
+ y = fl.getHeight();
+ height += y;
+ } else if (fl.getVisibility() == View.VISIBLE) {
+ height += fl.getHeight();
}
}
}