Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/297665
Change subject: Tweak Feed list card item UI ...................................................................... Tweak Feed list card item UI • Titles are now a roman font with a color of #222 and 6dp closer to the top of the item row. • Subtitles are now colored #555. • Thumbnails are now 40x40dp with a 2dp corner radius and a 1dp rgba(0,0,0,0.12) border inset visible when the image is translucent. • Overflow menus are 8dp lower. Bug: T139391 Change-Id: Ib8ea91d994311bc2a1230578187a714f8505a9c8 --- A app/src/main/res/drawable/view_list_card_item_image_background.xml M app/src/main/res/layout/view_list_card_item.xml M app/src/main/res/values/attrs.xml M app/src/main/res/values/colors.xml M app/src/main/res/values/dimens.xml M app/src/main/res/values/styles_dark.xml M app/src/main/res/values/styles_light.xml 7 files changed, 29 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/65/297665/1 diff --git a/app/src/main/res/drawable/view_list_card_item_image_background.xml b/app/src/main/res/drawable/view_list_card_item_image_background.xml new file mode 100644 index 0000000..10c414e --- /dev/null +++ b/app/src/main/res/drawable/view_list_card_item_image_background.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@android:color/white" /> + <stroke android:width="1dp" android:color="#4e000000" /> + <corners android:radius="2dp" /> +</shape> \ No newline at end of file diff --git a/app/src/main/res/layout/view_list_card_item.xml b/app/src/main/res/layout/view_list_card_item.xml index afe4ccc..900c259 100644 --- a/app/src/main/res/layout/view_list_card_item.xml +++ b/app/src/main/res/layout/view_list_card_item.xml @@ -6,16 +6,22 @@ <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="@dimen/list_item_horizontal_padding" + android:paddingTop="10dp" + android:paddingRight="@dimen/list_item_horizontal_padding" + android:paddingBottom="@dimen/list_item_horizontal_padding" + android:paddingLeft="@dimen/list_item_horizontal_padding" android:background="?attr/selectableItemBackground"> <com.facebook.drawee.view.SimpleDraweeView style="@style/SimpleDraweeViewPlaceholder.Article" android:id="@+id/view_list_card_item_image" - android:layout_width="@dimen/defaultListItemSize" - android:layout_height="@dimen/defaultListItemSize" + android:layout_width="@dimen/view_list_card_item_image" + android:layout_height="@dimen/view_list_card_item_image" android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" /> + android:layout_alignParentStart="true" + android:layout_marginTop="6dp" + app:roundedCornerRadius="2dp" + android:background="@drawable/view_list_card_item_image_background" /> <TextView android:id="@+id/view_list_card_item_title" @@ -27,7 +33,7 @@ android:layout_marginRight="16dp" android:textAppearance="@style/TextAppearance.AppCompat.Large" android:textSize="16sp" - android:textStyle="bold" + android:textColor="?attr/view_list_card_item_title" tools:text="Lorem ipsum"/> <TextView @@ -41,6 +47,7 @@ android:layout_marginRight="16dp" android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textSize="14sp" + android:textColor="?attr/view_big_picture_card_extract" tools:text="Lorem ipsum"/> </RelativeLayout> @@ -49,12 +56,13 @@ android:id="@+id/view_list_card_item_menu" android:layout_width="40dp" android:layout_height="40dp" - android:padding="8dp" + android:layout_marginTop="8dp" android:layout_gravity="end" + android:padding="8dp" app:srcCompat="@drawable/ic_more_vert_white_24dp" android:tint="@color/gray_highlight" android:clickable="true" android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@null"/> -</merge> \ No newline at end of file +</merge> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 266f113..1b274fb 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -30,6 +30,7 @@ <attr name="list_item_text_primary_color" format="reference"/> <attr name="list_item_text_secondary_color" format="reference"/> <attr name="view_big_picture_card_extract" format="reference" /> + <attr name="view_list_card_item_title" format="reference" /> <declare-styleable name="CabSearchView"> <attr name="cabEnabled" format="boolean" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index a7a1921..65bf375 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -98,8 +98,6 @@ <color name="widget_title_text">#606060</color> <color name="widget_content_text">#303030</color> - <color name="view_big_picture_card_extract_dark">#ccc</color> - <color name="view_big_picture_card_extract_light">#555</color> <color name="reading_list_add_background">#4888</color> <color name="reading_list_delete_link">#f00</color> @@ -107,4 +105,8 @@ <color name="feed_window_background">#eaecf0</color> <color name="feed_featured_icon_background">#ffb50d</color> + <color name="view_big_picture_card_extract_dark">#ccc</color> + <color name="view_big_picture_card_extract_light">#555</color> + <color name="view_list_card_item_title_dark">#999</color> + <color name="view_list_card_item_title_light">#222</color> </resources> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 7fc75a3..a670a90 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -99,4 +99,5 @@ <dimen name="view_list_card_item_margin">16dp</dimen> <dimen name="view_horizontal_scrolling_list_card_item_margin_horizontal">4dp</dimen> <dimen name="view_horizontal_scrolling_list_card_item_margin_vertical">0dp</dimen> + <dimen name="view_list_card_item_image">40dp</dimen> </resources> diff --git a/app/src/main/res/values/styles_dark.xml b/app/src/main/res/values/styles_dark.xml index bd71904..ae25c0b 100644 --- a/app/src/main/res/values/styles_dark.xml +++ b/app/src/main/res/values/styles_dark.xml @@ -59,6 +59,7 @@ <item name="android:listViewStyle">@style/ListView</item> <item name="view_big_picture_card_extract">@color/view_big_picture_card_extract_dark</item> + <item name="view_list_card_item_title">@color/view_list_card_item_title_dark</item> </style> <style name="Theme.Dark.Dialog" parent="Theme.AppCompat.Dialog"> diff --git a/app/src/main/res/values/styles_light.xml b/app/src/main/res/values/styles_light.xml index b823d83..69ca3bb 100644 --- a/app/src/main/res/values/styles_light.xml +++ b/app/src/main/res/values/styles_light.xml @@ -60,6 +60,7 @@ <item name="android:listViewStyle">@style/ListView</item> <item name="view_big_picture_card_extract">@color/view_big_picture_card_extract_light</item> + <item name="view_list_card_item_title">@color/view_list_card_item_title_light</item> </style> <style name="Theme.Light.Dialog" parent="Theme.AppCompat.Light.Dialog"> -- To view, visit https://gerrit.wikimedia.org/r/297665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8ea91d994311bc2a1230578187a714f8505a9c8 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski <sniedziel...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits