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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user