Refactor code to improve code re-use and enable testing, and add lots of unit tests. HardwareUILayout is no longer used. Test: Automated tests pass. Manual testing with different display sizes and with panel plugin enabled/disabled. Fixes: 130808177 Fixes: 128372852 Change-Id: I1e48d226973a9b610cece2691af7b233cdb5235c
71 lines
3.2 KiB
XML
71 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (C) 2019 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
|
|
-->
|
|
|
|
<com.android.systemui.globalactions.GlobalActionsColumnLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@id/global_actions_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:clipToPadding="false"
|
|
android:theme="@style/qs_theme"
|
|
android:gravity="center_vertical | right"
|
|
android:clipChildren="false"
|
|
>
|
|
<LinearLayout
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="wrap_content"
|
|
android:gravity="top | right"
|
|
android:orientation="vertical"
|
|
android:padding="0dp"
|
|
android:layout_marginTop="@dimen/global_actions_grid_container_bottom_margin"
|
|
android:layout_marginBottom="@dimen/global_actions_grid_container_bottom_margin"
|
|
>
|
|
<!-- Global actions is right-aligned to be physically near power button -->
|
|
<LinearLayout
|
|
android:id="@android:id/list"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:gravity="right"
|
|
android:translationZ="@dimen/global_actions_translate"
|
|
android:layout_marginRight="@dimen/global_actions_grid_side_margin"
|
|
android:paddingLeft="@dimen/global_actions_grid_horizontal_padding"
|
|
android:paddingRight="@dimen/global_actions_grid_horizontal_padding"
|
|
android:paddingTop="@dimen/global_actions_grid_vertical_padding"
|
|
android:paddingBottom="@dimen/global_actions_grid_vertical_padding"
|
|
/>
|
|
|
|
<!-- For separated items-->
|
|
<LinearLayout
|
|
android:id="@+id/separated_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/global_actions_grid_side_margin"
|
|
android:layout_marginRight="@dimen/global_actions_grid_side_margin"
|
|
android:paddingLeft="@dimen/global_actions_grid_horizontal_padding"
|
|
android:paddingRight="@dimen/global_actions_grid_horizontal_padding"
|
|
android:paddingTop="@dimen/global_actions_grid_vertical_padding"
|
|
android:paddingBottom="@dimen/global_actions_grid_vertical_padding"
|
|
android:orientation="vertical"
|
|
android:gravity="center"
|
|
android:translationZ="@dimen/global_actions_translate"
|
|
/>
|
|
</LinearLayout>
|
|
|
|
</com.android.systemui.globalactions.GlobalActionsColumnLayout>
|