summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-01-21 02:45:06 +0900
committersatok <satok@google.com>2011-01-21 12:28:01 +0900
commit865b97761cc58053f45a8b06b531d60d8e482c3a (patch)
tree6216a1909755a6a19d7e138ce63f4a469e8329e4 /core/java/android/inputmethodservice/InputMethodService.java
parent4c4332250d9e6d2cb746625cc232052561c4d450 (diff)
Show ime switch icon when there is a hard keyboard
Change-Id: Ife3a8733b1a1bf43b195ecf4b8c5082b6538d0a0
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 4d25bac067d4..f35a43863457 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -393,6 +393,10 @@ public class InputMethodService extends AbstractInputMethodService {
if (onShowInputRequested(flags, false)) {
showWindow(true);
}
+ // If user uses hard keyboard, IME button should always be shown.
+ if (!onEvaluateInputViewShown()) {
+ mImm.setIMEButtonVisible(mToken, true);
+ }
if (resultReceiver != null) {
resultReceiver.send(wasVis != isInputViewShown()
? InputMethodManager.RESULT_SHOWN
@@ -557,7 +561,7 @@ public class InputMethodService extends AbstractInputMethodService {
*/
public int touchableInsets;
}
-
+
/**
* You can call this to customize the theme used by your IME's window.
* This theme should typically be one that derives from
@@ -573,7 +577,7 @@ public class InputMethodService extends AbstractInputMethodService {
}
mTheme = theme;
}
-
+
@Override public void onCreate() {
mTheme = Resources.selectSystemTheme(mTheme,
getApplicationInfo().targetSdkVersion,
@@ -699,6 +703,10 @@ public class InputMethodService extends AbstractInputMethodService {
// Otherwise hide the window.
hideWindow();
}
+ // If user uses hard keyboard, IME button should always be shown.
+ if (!onEvaluateInputViewShown()) {
+ mImm.setIMEButtonVisible(mToken, true);
+ }
}
}
@@ -1386,10 +1394,10 @@ public class InputMethodService extends AbstractInputMethodService {
}
mInputViewStarted = false;
mCandidatesViewStarted = false;
+ mImm.setIMEButtonVisible(mToken, false);
if (mWindowVisible) {
mWindow.hide();
mWindowVisible = false;
- mImm.setIMEButtonVisible(mToken, false);
onWindowHidden();
mWindowWasVisible = false;
}