diff options
| author | 2023-04-11 15:04:14 +0000 | |
|---|---|---|
| committer | 2023-04-11 16:25:48 +0000 | |
| commit | eaeff484f808658598397c04ba6e5f0f68e94d41 (patch) | |
| tree | 1ffdc417363830200e7093591523fbbfe9991073 /java | |
| parent | d1614650f2b1cacbfd45520ed12e229c87bf0ea3 (diff) | |
Add horizontal dividers to UI per mocks
Above and below the actions row.
Extracted the actions row layout to be an include to reduce duplication
a bit without restructuring.
Colors and padding will likely change later.
Bug: 277745495
Test: Trigger different preivew UIs via ShareTest, validate that
dividers show up.
Change-Id: I16d60554d0c060f6472907f8557366344f22ddc3
Diffstat (limited to 'java')
| -rw-r--r-- | java/res/layout/chooser_action_row.xml | 40 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_file.xml | 7 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_image.xml | 8 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_text.xml | 7 |
4 files changed, 43 insertions, 19 deletions
diff --git a/java/res/layout/chooser_action_row.xml b/java/res/layout/chooser_action_row.xml new file mode 100644 index 00000000..303426c4 --- /dev/null +++ b/java/res/layout/chooser_action_row.xml @@ -0,0 +1,40 @@ +<!-- + ~ Copyright (C) 2023 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. + --> + +<merge + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> + + <View + android:layout_width="match_parent" + android:layout_height="2dp" + android:background="?androidprv:attr/materialColorSurfaceContainer" + /> + + <com.android.intentresolver.widget.ScrollableActionRow + android:id="@androidprv:id/chooser_action_row" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:gravity="center"/> + + <View + android:layout_width="match_parent" + android:layout_height="2dp" + android:background="?androidprv:attr/materialColorSurfaceContainer" + /> +</merge> + diff --git a/java/res/layout/chooser_grid_preview_file.xml b/java/res/layout/chooser_grid_preview_file.xml index bcc320d3..c9ef952a 100644 --- a/java/res/layout/chooser_grid_preview_file.xml +++ b/java/res/layout/chooser_grid_preview_file.xml @@ -71,12 +71,7 @@ android:textAppearance="@style/TextAppearance.ChooserDefault" /> </LinearLayout> - <com.android.intentresolver.widget.ScrollableActionRow - android:id="@androidprv:id/chooser_action_row" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:gravity="center" /> + <include layout="@layout/chooser_action_row" /> </LinearLayout> diff --git a/java/res/layout/chooser_grid_preview_image.xml b/java/res/layout/chooser_grid_preview_image.xml index 43f6f4d1..4a8f7ce3 100644 --- a/java/res/layout/chooser_grid_preview_image.xml +++ b/java/res/layout/chooser_grid_preview_image.xml @@ -59,11 +59,5 @@ android:textAppearance="@style/TextAppearance.ChooserDefault" /> </LinearLayout> - <com.android.intentresolver.widget.ScrollableActionRow - android:id="@androidprv:id/chooser_action_row" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:gravity="center" /> - + <include layout="@layout/chooser_action_row" /> </LinearLayout> diff --git a/java/res/layout/chooser_grid_preview_text.xml b/java/res/layout/chooser_grid_preview_text.xml index 5e7afa46..89e961e8 100644 --- a/java/res/layout/chooser_grid_preview_text.xml +++ b/java/res/layout/chooser_grid_preview_text.xml @@ -84,12 +84,7 @@ android:focusable="true"/> </RelativeLayout> - <com.android.intentresolver.widget.ScrollableActionRow - android:id="@androidprv:id/chooser_action_row" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:gravity="center" /> + <include layout="@layout/chooser_action_row" /> </LinearLayout> |