With Ib8f4045b9e8e7bf65c13437133f114d91d0cb050 navbar always has
contrast thereby creating a solid navbar. However, for IMEs that wish to
draw a gradient, will need to have this disabled.
This change disables contrast for extended navbar gradient.
Fix: 130809016
Test: Manually verified:
1. m -j ThemedNavBarKeyboard
2. Install and enable
3. Click "Extended dark nav bar" and verify gradient is visible.
Change-Id: I511bdcde0ef57c1484faace484db262b49fdfe16
This CL adds a sample IME that demonstrates how an IME can now control
the appearance of bottom navigation bar like typical Activities can
do.
This sample IME covers the following 3 use cases to control the
appearance of bottom navigation bar.
A. (Bottom) navigation bar has solid background color.
Like typical Activities, IMEs can
- call Window#setNavigationBarColor() to change the background
color. (Bug 25706186)
- set SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR to tell the SysUI to
optimize the navigation bar button colors. (Bug 69002467)
B. (Bottom) navigation background is seamlessly extended from the main
InputView of the IME, like typical Activities can do with
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION. Note that essentially this
is a super set of the mode A, because IMEs (and apps) can also fill
the navigation bar region with a solid color in this mode.
C. The appearance of (bottom) navigation bar is controlled by the
target application, not by the IME.
- This is useful for floating IME (Bug 22564251).
Bug: 25706186
Bug: 69002467
Test: Build and manually test as follows.
1. make -j ThemedNavBarKeyboard
2. adb install -r $OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
3. adb shell ime enable com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
4. adb shell ime set com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
Change-Id: I4b10a19641bd3ce6c43e7629404b6f202d4186e8