diff --git a/samples/ThemedNavBarKeyboard/src/com/example/android/themednavbarkeyboard/ThemedNavBarKeyboard.java b/samples/ThemedNavBarKeyboard/src/com/example/android/themednavbarkeyboard/ThemedNavBarKeyboard.java index b2b19d52c..6b33f3fee 100644 --- a/samples/ThemedNavBarKeyboard/src/com/example/android/themednavbarkeyboard/ThemedNavBarKeyboard.java +++ b/samples/ThemedNavBarKeyboard/src/com/example/android/themednavbarkeyboard/ThemedNavBarKeyboard.java @@ -56,6 +56,15 @@ public class ThemedNavBarKeyboard extends InputMethodService { private KeyboardLayoutView mLayout; + @Override + public void onCreate() { + super.onCreate(); + if (BuildCompat.EFFECTIVE_SDK_INT > Build.VERSION_CODES.P) { + // Disable contrast for extended navbar gradient. + getWindow().getWindow().setNavigationBarContrastEnforced(false); + } + } + @Override public View onCreateInputView() { mLayout = new KeyboardLayoutView(this, getWindow().getWindow());