Commit 7e6b66d4 authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

[SharingHub] Update styling and add icons

Update some of the share sheet styling to match the spec. Also add
in the icons for STTS and QRCodes.

screenshot: http://screen/4okyHGgCLAn.png

Bug: 1009124
Change-Id: If1aa78812644602643ff5d76d068ad1151bd159e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949077Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarJeffrey Cohen <jeffreycohen@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721700}
parent ed10f883
...@@ -13,13 +13,12 @@ ...@@ -13,13 +13,12 @@
android:showDividers="middle"> android:showDividers="middle">
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="113dp"
android:minHeight="@dimen/min_touch_target_size" android:minHeight="@dimen/min_touch_target_size"
android:orientation="horizontal"
android:id="@+id/share_sheet_chrome_apps" /> android:id="@+id/share_sheet_chrome_apps" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="113dp"
android:minHeight="@dimen/min_touch_target_size" android:minHeight="@dimen/min_touch_target_size"
android:orientation="horizontal" android:orientation="horizontal"
android:id="@+id/share_sheet_other_apps" /> android:id="@+id/share_sheet_other_apps" />
......
...@@ -7,25 +7,27 @@ ...@@ -7,25 +7,27 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:clickable="true" android:clickable="true"
android:layout_width="wrap_content" android:textAppearance="@style/TextAppearance.BlackCaptionDefault"
android:layout_height="wrap_content" android:layout_height="fill_parent"
android:layout_width="67dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:gravity="center_vertical" android:gravity="center_horizontal"
android:orientation="vertical" > android:orientation="vertical" >
<ImageView android:id="@+id/icon" <ImageView android:id="@+id/icon"
android:layout_width="48dp" android:layout_height="24dp"
android:layout_height="48dp" android:layout_marginTop="12dp"
android:layout_marginStart="20dp" android:layout_width="24dp"
android:layout_marginEnd="20dp"
android:padding="4dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
<TextView android:id="@+id/text" <TextView android:id="@+id/text"
android:layout_width="88dp" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:maxLines="2" android:maxLines="2"
android:paddingTop="13dp"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="@style/TextAppearance.BlackCaptionDefault" />
</LinearLayout> </LinearLayout>
...@@ -49,7 +49,7 @@ public class ShareSheetCoordinator { ...@@ -49,7 +49,7 @@ public class ShareSheetCoordinator {
PropertyModel qrcodePropertyModel = PropertyModel qrcodePropertyModel =
new PropertyModel.Builder(ShareSheetItemViewProperties.ALL_KEYS) new PropertyModel.Builder(ShareSheetItemViewProperties.ALL_KEYS)
.with(ShareSheetItemViewProperties.ICON, .with(ShareSheetItemViewProperties.ICON,
AppCompatResources.getDrawable(context, R.drawable.ic_launcher)) AppCompatResources.getDrawable(context, R.drawable.qr_code))
.with(ShareSheetItemViewProperties.LABEL, .with(ShareSheetItemViewProperties.LABEL,
context.getResources().getString(R.string.qr_code_share_icon_label)) context.getResources().getString(R.string.qr_code_share_icon_label))
.with(ShareSheetItemViewProperties.CLICK_LISTENER, .with(ShareSheetItemViewProperties.CLICK_LISTENER,
...@@ -64,7 +64,7 @@ public class ShareSheetCoordinator { ...@@ -64,7 +64,7 @@ public class ShareSheetCoordinator {
PropertyModel sttsPropertyModel = PropertyModel sttsPropertyModel =
new PropertyModel.Builder(ShareSheetItemViewProperties.ALL_KEYS) new PropertyModel.Builder(ShareSheetItemViewProperties.ALL_KEYS)
.with(ShareSheetItemViewProperties.ICON, .with(ShareSheetItemViewProperties.ICON,
AppCompatResources.getDrawable(context, R.drawable.ic_launcher)) AppCompatResources.getDrawable(context, R.drawable.send_tab))
.with(ShareSheetItemViewProperties.LABEL, .with(ShareSheetItemViewProperties.LABEL,
context.getResources().getString( context.getResources().getString(
R.string.send_tab_to_self_share_activity_title)) R.string.send_tab_to_self_share_activity_title))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment