Skip to content
Commit 0a9d1ea0 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Allow IMEs to opt out the opaque navigation guard view.

Previous CLs [1][2] introduced an opaque navigation guard view to
avoid the island effect (the real nav bar is transparent but the IME
shows its UI with assuming that the real nav bar is opaque).
 [1] I460912ee7c117480c57b947ed31eca330819f32c
 [2] I6a93f30aec83f1cecfb854073046cbc87ab4aa66
Although the current guard view works fine for that particular case,
there are two major situations where having an opaque navigation
guard view does not make much sense.
  1. The IME shows no software keyboard at all.
     Some IMEs automatically hide software keyboard when a hardware
     keyboard is attached.
  2. The IME relies on floating UI that is disjoint from the bottom of
     the screen.
The main goal of this CL is to address case 2 because unlike case 1
the system is not able to automatically detect the case 2.  Only IME
developers know when the opaque guard view should be opted out.
Of course, if IME developers can opt out the opaque guard view,
it means that they can also work around case 1 without relying on
the system, but again it is not the primary goal of this CL.
With this CL IMEs are now able to opt out the opaque navigation guard
view by calling Window#setNavigationBarColor(Color.TRANSPARENT) from
InputMethodService#onWindowShown().  Note that this API used to have
no effect for IME, hence reusing this here should have no compatibility
issues.
Note that any other color is currently ignored to minimize the impact
on UX.

Bug: 22564251
Change-Id: Iea77915ecc55eedaf19899e72c44f704ba9d852c
parent ec741671
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment