For a landscape or close-to-square device, the button layout of nav bar was abnormal since System UI assumes the nav bar position would change if device rotated. However, for default landscape device, nav bar will be always on the buttom. This patch resolve the assumption by using nav bar direction (horizon/vertical) instead of rotation. Also renaming the layout for consistency. Test: atest SystemUITests Test: atest NavigationBarFlaterViewTest Test: manual - rotate the phone and comapre to my Pixel2 Test: manual - test the peproduce steps and the layout of nav bar buttons is normal Fix: 124428114 Change-Id: I23444bcb2a44555e7116f6140a29147c5a03ed69
55 lines
2.2 KiB
XML
55 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2016 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<FrameLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:systemui="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginTop="@dimen/rounded_corner_content_padding"
|
|
android:layout_marginBottom="@dimen/rounded_corner_content_padding"
|
|
android:paddingTop="@dimen/nav_content_padding"
|
|
android:paddingBottom="@dimen/nav_content_padding"
|
|
android:id="@+id/vertical">
|
|
|
|
<com.android.systemui.statusbar.phone.NearestTouchFrame
|
|
android:id="@+id/nav_buttons"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:clipChildren="false"
|
|
android:clipToPadding="false">
|
|
|
|
<com.android.systemui.statusbar.phone.ReverseLinearLayout
|
|
android:id="@+id/ends_group"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:clipToPadding="false"
|
|
android:clipChildren="false" />
|
|
|
|
<com.android.systemui.statusbar.phone.ReverseLinearLayout
|
|
android:id="@+id/center_group"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:orientation="vertical"
|
|
android:clipToPadding="false"
|
|
android:clipChildren="false" />
|
|
|
|
</com.android.systemui.statusbar.phone.NearestTouchFrame>
|
|
|
|
</FrameLayout>
|