summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowInsetsAnimationController.java
diff options
context:
space:
mode:
authorTaran Singh <tarandeep@google.com>2020-06-10 13:42:49 -0700
committerTaran Singh <tarandeep@google.com>2020-06-20 03:51:00 +0000
commit4291410118852cd6de6e4ce89a907fed1c33f92f (patch)
tree4cf5f39e23399adaf7740078965266715e4e6f78 /core/java/android/view/WindowInsetsAnimationController.java
parent3987866cd7af2c2dda81592388dcc9c7b1d516a6 (diff)
Animate IME with zero insets
When IME has zero insets, it doesn't map to any side and doesn't have can't be animated. IME can have zero insets in following cases: 1. Floating IME 2. Fullscreen IME (in landscape) 3. IME doesn't overlap with IME target window. In order to animate a type, it must have insets. We can animate IME from negative insets to zero and vice-versa. This makes zero insets IME a special case of ISIDE_BOTTOM. Deprecate SIDE_FLOATING because it shouldn't logically map to a side. Fix: 153909316 Test: atest WindowInsetsAnimationImeTests#testZeroInsetsImeAnimates Change-Id: I6d1d3430888db4632cb2f93e9042f692b35ebaeb
Diffstat (limited to 'core/java/android/view/WindowInsetsAnimationController.java')
-rw-r--r--core/java/android/view/WindowInsetsAnimationController.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/view/WindowInsetsAnimationController.java b/core/java/android/view/WindowInsetsAnimationController.java
index fb9d05e2d730..792b974558bb 100644
--- a/core/java/android/view/WindowInsetsAnimationController.java
+++ b/core/java/android/view/WindowInsetsAnimationController.java
@@ -181,4 +181,11 @@ public interface WindowInsetsAnimationController {
* @return {@code true} if the instance is cancelled, {@code false} otherwise.
*/
boolean isCancelled();
+
+ /**
+ * @hide
+ * @return {@code true} when controller controls IME and IME has no insets (floating,
+ * fullscreen or non-overlapping).
+ */
+ boolean hasZeroInsetsIme();
}