diff options
| author | 2023-03-18 14:45:17 +0000 | |
|---|---|---|
| committer | 2023-03-21 02:48:30 +0000 | |
| commit | 19b5edd72865206184068604804d5eebf83f896d (patch) | |
| tree | 0be73be8bac970e03c2a3b6baf80c1f2901da961 /java/res/layout | |
| parent | 3c3755b4ea535df1b5f2a9f3e57b235b660e1fcd (diff) | |
Add headline to sharesheet.
Move modify share UI to upper right.
Bug: 273788379
Bug: 271159515
Test: atest IntentResolverUnitTests
Change-Id: Ia1099c60a4bf9034b6a34b48a948ca1b5280a9aa
Diffstat (limited to 'java/res/layout')
| -rw-r--r-- | java/res/layout/chooser_grid_preview_file.xml | 10 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_image.xml | 16 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_text.xml | 10 | ||||
| -rw-r--r-- | java/res/layout/chooser_headline_row.xml | 57 |
4 files changed, 62 insertions, 31 deletions
diff --git a/java/res/layout/chooser_grid_preview_file.xml b/java/res/layout/chooser_grid_preview_file.xml index 6ba06b3d..036c5318 100644 --- a/java/res/layout/chooser_grid_preview_file.xml +++ b/java/res/layout/chooser_grid_preview_file.xml @@ -27,6 +27,8 @@ android:paddingBottom="@dimen/chooser_view_spacing" android:background="?android:attr/colorBackground"> + <include layout="@layout/chooser_headline_row" /> + <LinearLayout android:layout_width="@dimen/chooser_preview_width" android:layout_height="wrap_content" @@ -69,14 +71,6 @@ android:textAppearance="@style/TextAppearance.ChooserDefault" /> </LinearLayout> - <TextView - android:id="@+id/reselection_action" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone" - android:gravity="center" - style="@style/ReselectionAction" /> - <ViewStub android:id="@+id/action_row_stub" android:layout_width="match_parent" diff --git a/java/res/layout/chooser_grid_preview_image.xml b/java/res/layout/chooser_grid_preview_image.xml index 1c0e4c2e..9ad594e8 100644 --- a/java/res/layout/chooser_grid_preview_image.xml +++ b/java/res/layout/chooser_grid_preview_image.xml @@ -24,13 +24,7 @@ android:orientation="vertical" android:background="?android:attr/colorBackground"> - <CheckBox - android:id="@+id/include_text_action" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginEnd="@dimen/chooser_edge_margin_normal" - android:visibility="gone" /> + <include layout="@layout/chooser_headline_row" /> <LinearLayout android:layout_width="match_parent" @@ -59,14 +53,6 @@ android:textAppearance="@style/TextAppearance.ChooserDefault" /> </LinearLayout> - <TextView - android:id="@+id/reselection_action" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone" - android:gravity="center" - style="@style/ReselectionAction" /> - <ViewStub android:id="@+id/action_row_stub" android:layout_width="match_parent" diff --git a/java/res/layout/chooser_grid_preview_text.xml b/java/res/layout/chooser_grid_preview_text.xml index f521e31d..47beaa5a 100644 --- a/java/res/layout/chooser_grid_preview_text.xml +++ b/java/res/layout/chooser_grid_preview_text.xml @@ -26,6 +26,8 @@ android:orientation="vertical" android:background="?android:attr/colorBackground"> + <include layout="@layout/chooser_headline_row" /> + <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -82,14 +84,6 @@ android:focusable="true"/> </RelativeLayout> - <TextView - android:id="@+id/reselection_action" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone" - android:gravity="center" - style="@style/ReselectionAction" /> - <ViewStub android:id="@+id/action_row_stub" android:layout_width="match_parent" diff --git a/java/res/layout/chooser_headline_row.xml b/java/res/layout/chooser_headline_row.xml new file mode 100644 index 00000000..9dfab892 --- /dev/null +++ b/java/res/layout/chooser_headline_row.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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. + --> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="@dimen/chooser_edge_margin_normal" +> + <TextView + android:id="@+id/headline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone" + android:layout_alignParentStart="true" + android:textColor="?android:attr/textColorPrimary" + android:fontFamily="@androidprv:string/config_headlineFontFamily" + android:textSize="18sp" + android:paddingBottom="16dp" + /> + + <TextView + android:id="@+id/reselection_action" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:visibility="gone" + android:paddingBottom="16dp" + style="@style/ReselectionAction" /> + + <!-- This is only relevant for image+text preview, but needs to be in this layout so it can + stay at the top if there's no reselection action. --> + <CheckBox + android:id="@+id/include_text_action" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_below="@id/reselection_action" + android:layout_alignWithParentIfMissing="true" + android:visibility="gone" /> + +</RelativeLayout> |