diff options
| author | 2023-04-24 17:28:43 +0000 | |
|---|---|---|
| committer | 2023-04-24 17:28:43 +0000 | |
| commit | cc87f6ba72bce3f1aa9725134a3f2ad29e98a467 (patch) | |
| tree | 0f8d0bbd84de2c3e357a0e752e87911149b28520 /java/res | |
| parent | 9d9a7263e5a19db2d39204fb81d641f3bbe9b5e5 (diff) | |
| parent | c393f91bcf5976d2db378b1da5a82a37ddc8e6c1 (diff) | |
Merge "Align file sharing UI with mocks." into udc-dev
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 ca4604c0..3a780a7f 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, |