summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yigit Boyar <yboyar@google.com> 2016-07-19 15:32:09 -0700
committer Yigit Boyar <yboyar@google.com> 2016-07-19 15:32:09 -0700
commit4d827aafadde6b04b7223b527a3390635eb4dc92 (patch)
treed5686388198a1d0201134c02f4639c3fa0f34fd7
parentb822f7a9565474268f0ee60db5a5bd1b08a634dc (diff)
Resolve ListView children's RTL properties when added
ListView adds children without requesting a layout for them. This creates a problem if the child does not request a layout because we reset the child's RTL properties when addViewInner is called. A proper solution would be to call resolve when child is being measured (and ignore cache if it resolves) but a change like that is too risky for MR1. This CL will fix ListView portion of the issue. On master, we'll solve this in View level. Bug: 30132566 Change-Id: I0b131ac1086b1d32146f3c93d1323050873293d3
-rw-r--r--core/java/android/widget/ListView.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index b8b7c553a1db..8f908fb85444 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -2050,6 +2050,8 @@ public class ListView extends AbsListView {
p.recycledHeaderFooter = true;
}
addViewInLayout(child, flowDown ? -1 : 0, p, true);
+ // add view in layout will reset the RTL properties. We have to re-resolve them
+ child.resolveRtlPropertiesIfNeeded();
}
if (needToMeasure) {