diff options
| author | 2023-04-21 02:23:11 +0000 | |
|---|---|---|
| committer | 2023-04-24 13:49:49 +0000 | |
| commit | c393f91bcf5976d2db378b1da5a82a37ddc8e6c1 (patch) | |
| tree | ef1e32e0a30ac3f42d8d13bed22a3c940570954b /java/res | |
| parent | 395868a876907174d4923823048bd1f81a1987a7 (diff) | |
Align file sharing UI with mocks.
Mocks:
https://www.figma.com/file/JVIcmg4OhWuO5Vc1UdPVxe/Sharesheet-(U)?node-id=66-5067&t=GK4LwE6SDaQyVyov-0
- Split text into two lines (when needed)
- Change headline to "files" instead of "items".
- Shaded background around content.
- Just use one icon for now (this will be updated later).
Bug: 279070016
Test: atest UnbundledChooserActivityTest
Test: atest HeadlineGeneratorImplTest
Change-Id: I696b4bc21250290253b78b56c6fc20278e939a8a
Diffstat (limited to 'java/res')
| -rw-r--r-- | java/res/layout/chooser_grid_preview_file.xml | 76 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_text.xml | 1 | ||||
| -rw-r--r-- | java/res/values/strings.xml | 21 |
3 files changed, 55 insertions, 43 deletions
diff --git a/java/res/layout/chooser_grid_preview_file.xml b/java/res/layout/chooser_grid_preview_file.xml index 40ab2f0b..9fd90f10 100644 --- a/java/res/layout/chooser_grid_preview_file.xml +++ b/java/res/layout/chooser_grid_preview_file.xml @@ -27,41 +27,53 @@ android:paddingBottom="@dimen/chooser_view_spacing" android:background="?android:attr/colorBackground"> - <include layout="@layout/chooser_headline_row" /> + <include layout="@layout/chooser_headline_row"/> - <LinearLayout - android:layout_width="@dimen/chooser_preview_width" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:orientation="horizontal" - android:paddingLeft="@dimen/chooser_edge_margin_normal" - android:paddingRight="@dimen/chooser_edge_margin_normal" - android:layout_marginBottom="@dimen/chooser_view_spacing" - android:id="@androidprv:id/content_preview_file_layout"> - - <ImageView - android:id="@androidprv:id/content_preview_file_icon" - android:layout_width="36dp" - android:layout_height="36dp" - android:layout_marginRight="16dp" - android:adjustViewBounds="true" - android:layout_gravity="center_vertical" - android:gravity="center" - android:scaleType="fitCenter" /> - <TextView - android:id="@androidprv:id/content_preview_filename" - android:layout_width="0dp" - android:layout_weight="1" + <RelativeLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:ellipsize="middle" - android:gravity="start|top" - android:paddingRight="24dp" - android:singleLine="true" - android:textAppearance="@style/TextAppearance.ChooserDefault" /> - </LinearLayout> + android:layout_gravity="center" + android:layout_marginHorizontal="@dimen/chooser_edge_margin_normal" + android:layout_marginBottom="@dimen/chooser_view_spacing" + android:padding="@dimen/chooser_edge_margin_normal" + android:background="@drawable/chooser_content_preview_rounded" + android:id="@androidprv:id/content_preview_file_layout"> + + <ImageView + android:id="@+id/content_preview_file_icon" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginEnd="16dp" + android:layout_alignParentStart="true" + android:layout_centerVertical="true" + android:src="@drawable/ic_file_copy" + android:scaleType="fitCenter"/> + <TextView + android:id="@+id/content_preview_filename" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@id/content_preview_file_icon" + android:layout_alignParentTop="true" + android:layout_alignWithParentIfMissing="true" + android:ellipsize="middle" + android:gravity="start|top" + android:singleLine="true" + android:textStyle="bold" + android:textAppearance="@style/TextAppearance.ChooserDefault"/> + + <TextView + android:id="@+id/content_preview_more_files" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@id/content_preview_file_icon" + android:layout_below="@id/content_preview_filename" + android:layout_alignWithParentIfMissing="true" + android:gravity="start|top" + android:singleLine="true" + android:textAppearance="@style/TextAppearance.ChooserDefault"/> + </RelativeLayout> - <include layout="@layout/chooser_action_row" /> + <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 e22cfbd2..3a390025 100644 --- a/java/res/layout/chooser_grid_preview_text.xml +++ b/java/res/layout/chooser_grid_preview_text.xml @@ -32,7 +32,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" - android:orientation="horizontal" android:layout_marginLeft="@dimen/chooser_edge_margin_normal" android:layout_marginRight="@dimen/chooser_edge_margin_normal" android:layout_marginBottom="@dimen/chooser_view_spacing" diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 1648831c..8a24b349 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -124,12 +124,6 @@ <!-- Notification action for editing a screenshot (drawing on it, cropping it, etc) --> <string name="screenshot_edit">Edit</string> - <string name="file_count">{count, plural, - =1 {{file_name} + # file} - other {{file_name} + # files} - } - </string> - <!-- Represents a number of other files also being shared; used as an item at the end of a list --> <string name="other_files">{count, plural, =1 {+ # file} @@ -137,6 +131,13 @@ } </string> + <!-- Text label indicating the number of other files also being shared --> + <string name="more_files">{count, plural, + =1 {+ # more file} + other {+ # more files} + } + </string> + <!-- Title atop a sharing UI indicating that text is being shared [CHAR_LIMIT=50] --> <string name="sharing_text">Sharing text</string> <!-- Title atop a sharing UI indicating that a link (URL) is being shared [CHAR_LIMIT=50] --> @@ -153,11 +154,11 @@ other {Sharing # videos} } </string> - <!-- Title atop a sharing UI indicating that some number of items are being shared + <!-- Title atop a sharing UI indicating that some number of files are being shared (for example: sharing a mixture of photos and videos [CHAR_LIMIT=50] --> - <string name="sharing_items">{count, plural, - =1 {Sharing # item} - other {Sharing # items} + <string name="sharing_files">{count, plural, + =1 {Sharing # file} + other {Sharing # files} } </string> <string name="sharing_images_with_text">{count, plural, |