linearlayout: fix measurement of childrens when parent and childrens have exactly the same pixels
When children measure exactly the same width/height than the parent, any child with width/height == 0 and with weight > 0 must be reset. Otherwise, the view will retains the same width/height between measurements calls (that is not valid if the view changed its orientation). This explain the bug in CYAN-5471 when in hpdi devices the spacer view has the same width after rotate from landscape to portrait when language is german and date beewteen September 10-30. Steps to repro in i9100 (hdpi): 1.- Set language to german and date to September, 10. 2.- First run, the expanded bar has the same width that its children (480px the current screen size), but spacer has 0px (because it isn't being measured by linearlayout). 3.- Rotate to landscape, spacer gains space and all buttons are displayed correctly. 4.- Rotate to portrait, spacer has the same width that in step 3, because it isn't measured again and delta == 0; This patch forces this views to be re-measured to 0 to match the current delta (the views doesn't need to be expanded or shrinked). JIRA: CYAN-5471 https://jira.cyanogenmod.org/browse/CYAN-5471 Signed-off-by:Jorge Ruesga <jorge@ruesga.com> Change-Id: Iab60337eca6ded7b2b4d57fdcc95863be461db34
Loading
Please register or sign in to comment