diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 25a5de250..f3cf6cde2 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -30,6 +30,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; import android.content.res.Resources; +import android.graphics.Color; import android.inputmethodservice.InputMethodService; import android.media.AudioManager; import android.os.Debug; @@ -967,6 +968,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (TRACE) Debug.startMethodTracing("/data/trace/latinime"); } + @Override + public void onWindowShown() { + super.onWindowShown(); + setNavigationBarVisibility(isInputViewShown()); + } + @Override public void onWindowHidden() { super.onWindowHidden(); @@ -974,6 +981,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (mainKeyboardView != null) { mainKeyboardView.closing(); } + setNavigationBarVisibility(false); } void onFinishInputInternal() { @@ -1865,4 +1873,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } return mRichImm.shouldOfferSwitchingToNextInputMethod(token, fallbackValue); } + + private void setNavigationBarVisibility(final boolean visible) { + // Color.BLACK is ignored and default IME navigation bar color is used. + getWindow().getWindow().setNavigationBarColor(visible ? Color.BLACK : Color.TRANSPARENT); + } }