summaryrefslogtreecommitdiff
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-09-24 05:16:00 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-09-24 05:16:00 +0000
commitcfe00f41fa388e98c577bf3bd727dc47d3e49ef5 (patch)
treeff10a7991dc6d686d2fa240a6a210b1582a675d2 /core/java/android/view/View.java
parent3bb8d8b8a985178e798b5b19d3336b536493c1db (diff)
parentb2689e0350009e5c1edbf46c0b33da540f2335b6 (diff)
Snap for 9101843 from b2689e0350009e5c1edbf46c0b33da540f2335b6 to tm-qpr1-release
Change-Id: Ifdeeaa82d370f1407f296d46826984cf96d17105
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index b0d465769deb..a78af04995d3 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8207,7 +8207,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// We have not been laid out yet, hence cannot evaluate
// whether this view is visible to the user, we will do
// the evaluation once layout is complete.
- if (!isLaidOut()) {
+ // Sometimes, views are already laid out, but it's still
+ // not visible to the user, we also do the evaluation once
+ // the view is visible. ex: There is a fade-in animation
+ // for the activity, the view will be laid out when the
+ // animation beginning. On the time, the view is not visible
+ // to the user. And then as the animation progresses, the view
+ // becomes visible to the user.
+ if (!isLaidOut() || !isVisibleToUser()) {
mPrivateFlags3 |= PFLAG3_NOTIFY_AUTOFILL_ENTER_ON_LAYOUT;
} else if (isVisibleToUser()) {
if (isFocused()) {