aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-01-17 13:43:51 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-01-17 17:04:53 +0900
commit66432cfc9b7680a653bcf19d0d4250db21155ece (patch)
tree98a41ca3a64e2686dbf98d4374b5085202245cd3 /java/src/com/android/inputmethod/latin/LatinIME.java
parent67e08bb0fb922532d21e9a03c4e1627f62703935 (diff)
downloadlatinime-66432cfc9b7680a653bcf19d0d4250db21155ece.tar.gz
latinime-66432cfc9b7680a653bcf19d0d4250db21155ece.tar.xz
latinime-66432cfc9b7680a653bcf19d0d4250db21155ece.zip
Place language name at center of spacebar if no space icon
This change also leaves the language name as light grayed after fading out. Bug: 3290290 Change-Id: I71adf80c9a3b77d2fd34bca458845d85d55cbee7
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index b93b07ffb..bea44eef2 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -154,6 +154,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private boolean mConfigSwipeDownDismissKeyboardEnabled;
private int mConfigDelayBeforeFadeoutLanguageOnSpacebar;
private int mConfigDurationOfFadeoutLanguageOnSpacebar;
+ private float mConfigFinalFadeoutFactorOfLanugageOnSpacebar;
private int mCorrectionMode;
private int mCommittedLength;
@@ -267,13 +268,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
break;
case MSG_FADEOUT_LANGUAGE_ON_SPACEBAR:
if (inputView != null)
- inputView.setSpacebarTextFadeFactor(0.5f, (LatinKeyboard)msg.obj);
+ inputView.setSpacebarTextFadeFactor(
+ (1.0f + mConfigFinalFadeoutFactorOfLanugageOnSpacebar) / 2,
+ (LatinKeyboard)msg.obj);
sendMessageDelayed(obtainMessage(MSG_DISMISS_LANGUAGE_ON_SPACEBAR, msg.obj),
mConfigDurationOfFadeoutLanguageOnSpacebar);
break;
case MSG_DISMISS_LANGUAGE_ON_SPACEBAR:
if (inputView != null)
- inputView.setSpacebarTextFadeFactor(0.0f, (LatinKeyboard)msg.obj);
+ inputView.setSpacebarTextFadeFactor(
+ mConfigFinalFadeoutFactorOfLanugageOnSpacebar, (LatinKeyboard)msg.obj);
break;
}
}
@@ -356,6 +360,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
R.integer.config_delay_before_fadeout_language_on_spacebar);
mConfigDurationOfFadeoutLanguageOnSpacebar = res.getInteger(
R.integer.config_duration_of_fadeout_language_on_spacebar);
+ mConfigFinalFadeoutFactorOfLanugageOnSpacebar = res.getInteger(
+ R.integer.config_final_fadeout_percentage_of_language_on_spacebar) / 100.0f;
Utils.GCUtils.getInstance().reset();
boolean tryGC = true;