Merge "Refactor global actions items and lock message view."
This commit is contained in:
committed by
Android (Google) Code Review
commit
c6ba6568b3
@@ -1,67 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/global_actions_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<com.android.systemui.globalactions.GlobalActionsFlatLayout
|
||||
android:id="@id/global_actions_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:theme="@style/qs_theme"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:layout_marginStart="@dimen/global_actions_side_margin"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/global_actions_grid_vertical_padding"
|
||||
android:paddingBottom="@dimen/global_actions_grid_vertical_padding"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="left | center_vertical"
|
||||
android:translationZ="@dimen/global_actions_translate"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:id="@+id/global_actions_overflow_button"
|
||||
android:contentDescription="@string/accessibility_menu"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
>
|
||||
<ImageView
|
||||
android:src="@drawable/ic_more_vert"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/control_more_vert"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.android.systemui.globalactions.GlobalActionsFlatLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/global_actions_lock_message_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
<TextView
|
||||
android:id="@+id/global_actions_lock_message"
|
||||
style="@style/TextAppearance.Control.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/global_actions_side_margin"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/global_action_lock_message"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.35"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<include layout="@layout/global_actions_view" />
|
||||
|
||||
<include layout="@layout/global_actions_lock_view" />
|
||||
|
||||
<com.android.systemui.globalactions.MinHeightScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
35
packages/SystemUI/res/layout/global_actions_lock_view.xml
Normal file
35
packages/SystemUI/res/layout/global_actions_lock_view.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
~ Copyright (C) 2020 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.
|
||||
-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/global_actions_lock_message_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
<TextView
|
||||
android:id="@+id/global_actions_lock_message"
|
||||
style="@style/TextAppearance.Control.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/global_actions_side_margin"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/global_action_lock_message"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.35"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
52
packages/SystemUI/res/layout/global_actions_view.xml
Normal file
52
packages/SystemUI/res/layout/global_actions_view.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
~ Copyright (C) 2020 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.GlobalActionsFlatLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@id/global_actions_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:theme="@style/qs_theme"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:layout_marginStart="@dimen/global_actions_side_margin"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/global_actions_grid_vertical_padding"
|
||||
android:paddingBottom="@dimen/global_actions_grid_vertical_padding"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="left | center_vertical"
|
||||
android:translationZ="@dimen/global_actions_translate"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:id="@+id/global_actions_overflow_button"
|
||||
android:contentDescription="@string/accessibility_menu"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
>
|
||||
<ImageView
|
||||
android:src="@drawable/ic_more_vert"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/control_more_vert"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.android.systemui.globalactions.GlobalActionsFlatLayout>
|
||||
Reference in New Issue
Block a user