OSDN Git Service

Fix RTL in QS Header Info
authorFabian Kozynski <kozynski@google.com>
Tue, 21 May 2019 14:06:44 +0000 (10:06 -0400)
committerFabian Kozynski <kozynski@google.com>
Tue, 21 May 2019 15:30:03 +0000 (11:30 -0400)
commit895cc9bb755d2832e22eb0c3e96f921ff822f4d2
tree4136b0972cc267aa0db8a5d3d8c9749fdcdb6725
parent738c98232cd8489becf100a148d619c11ca05fa7
Fix RTL in QS Header Info

When there was only one view to display, we relay on
FrameLayout#onLayout. Setting the layout_gravity to center_vertical
(which is unneeded here) was removing the "start" by default.

Lays out Views from start to end keeping track of offset. As the Views
were given their final size in onMeasure, laying out is easy.

Fixes: 133221093
Test: manual using Hebrew and English
Change-Id: Id57d951bbbacbff7745869fe5b288d620a3c25f1
packages/SystemUI/res/layout/quick_settings_header_info.xml
packages/SystemUI/src/com/android/systemui/qs/QSHeaderInfoLayout.kt