Add IME switcher/hide button bar when IME showing
Bug: 180046394 Change-Id: Ic2bd919ab3d27e0a430b081c771ea8dc5827be81
This commit is contained in:
1 parent
16fd85629d
commit
673faf59ee
10 files changed
+383
-40
No files matched your search
@@ -44,7 +44,7 @@ public class TaskbarAnimationController {
|
||||
private final AnimatedFloat mTaskbarVisibilityAlphaForLauncherState = new AnimatedFloat(
|
||||
this::updateVisibilityAlpha);
|
||||
private final AnimatedFloat mTaskbarVisibilityAlphaForIme = new AnimatedFloat(
|
||||
this::updateVisibilityAlpha);
|
||||
this::updateVisibilityAlphaForIme);
|
||||
|
||||
// Scale.
|
||||
private final AnimatedFloat mTaskbarScaleForLauncherState = new AnimatedFloat(
|
||||
@@ -110,16 +110,22 @@ public class TaskbarAnimationController {
|
||||
// We use mTaskbarBackgroundAlpha as a proxy for whether Launcher is resumed/paused, the
|
||||
// assumption being that Taskbar should always be visible regardless of the current
|
||||
// LauncherState if Launcher is paused.
|
||||
float alphaDueToIme = mTaskbarVisibilityAlphaForIme.value;
|
||||
float alphaDueToLauncher = Math.max(mTaskbarBackgroundAlpha.value,
|
||||
mTaskbarVisibilityAlphaForLauncherState.value);
|
||||
float alphaDueToOther = mTaskbarVisibilityAlphaForIme.value;
|
||||
float taskbarAlpha = alphaDueToLauncher * alphaDueToOther;
|
||||
float taskbarAlpha = alphaDueToLauncher * alphaDueToIme;
|
||||
mTaskbarCallbacks.updateTaskbarVisibilityAlpha(taskbarAlpha);
|
||||
|
||||
// Make the nav bar invisible if taskbar is visible.
|
||||
setNavBarButtonAlpha(1f - taskbarAlpha);
|
||||
}
|
||||
|
||||
private void updateVisibilityAlphaForIme() {
|
||||
updateVisibilityAlpha();
|
||||
float taskbarAlphaDueToIme = mTaskbarVisibilityAlphaForIme.value;
|
||||
mTaskbarCallbacks.updateImeBarVisibilityAlpha(1f - taskbarAlphaDueToIme);
|
||||
}
|
||||
|
||||
private void updateScale() {
|
||||
// We use mTaskbarBackgroundAlpha as a proxy for whether Launcher is resumed/paused, the
|
||||
// assumption being that Taskbar should always be at scale 1f regardless of the current
|
||||
|
||||
Reference in new issue
Block a user