OSDN Git Service

Force AlertDialogLayout to have gravity start|top
authorAdam Powell <adamp@google.com>
Thu, 28 Jul 2016 23:30:10 +0000 (16:30 -0700)
committerAdam Powell <adamp@google.com>
Fri, 29 Jul 2016 15:30:01 +0000 (15:30 +0000)
commit39e0bf23f50a3de112b232321c5e0a1013af70c7
tree549cb8dc5181252710d7d2d50e8aec2b93de68dc
parent6cecc8dc278845bc2868b28c510a18cd20e95a44
Force AlertDialogLayout to have gravity start|top

AlertDialogLayout overrides LinearLayout#onMeasure but not onLayout,
meaning that some state initialized for the handling of gravity may
not be valid in LinearLayout#onLayout. As this is an internal class
never used directly by apps, explicitly specify the default gravity of
start|top in @layout/alert_dialog_material to avoid this bug. Apps
that do things like set gravity in their theme (for whatever reason)
could otherwise change its behavior.

Bug 30494039

Change-Id: I71a8be1829a7fe24cf7714a3bd5ed732f85eb887
core/res/res/layout/alert_dialog_material.xml