From 9d686e16e043d422c2a050cf7ee2890cbeffede0 Mon Sep 17 00:00:00 2001 From: Torsten Grote <t@grobox.de> Date: Fri, 13 May 2016 12:40:26 -0300 Subject: [PATCH] Increase Avatar border and change shadow color --- briar-android/res/layout/author_view.xml | 6 +++--- briar-android/res/layout/contact_avatar_status.xml | 2 +- briar-android/res/layout/dropdown_author.xml | 5 ++--- briar-android/res/layout/introduction_message.xml | 6 ++---- briar-android/res/layout/list_item_contact.xml | 3 +-- .../res/layout/list_item_selectable_contact.xml | 3 +-- briar-android/res/layout/text_avatar_view.xml | 10 ++++------ briar-android/res/values/color.xml | 2 +- briar-android/res/values/dimens.xml | 2 +- briar-android/res/values/styles.xml | 8 ++++++++ 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/briar-android/res/layout/author_view.xml b/briar-android/res/layout/author_view.xml index ba8810b4cc..4fb0b9d6b4 100644 --- a/briar-android/res/layout/author_view.xml +++ b/briar-android/res/layout/author_view.xml @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarView" + style="@style/BriarAvatar" android:layout_width="@dimen/listitem_picture_size" android:layout_height="@dimen/listitem_picture_size" android:layout_centerVertical="true" android:layout_marginLeft="@dimen/listitem_horizontal_margin" android:layout_marginStart="@dimen/listitem_horizontal_margin" - app:civ_border_width="@dimen/avatar_border_width" - app:civ_border_color="@color/briar_primary"/> + tools:src="@drawable/ic_launcher"/> <ImageView android:id="@+id/statusView" diff --git a/briar-android/res/layout/contact_avatar_status.xml b/briar-android/res/layout/contact_avatar_status.xml index 5c3415c911..9f6ca42b45 100644 --- a/briar-android/res/layout/contact_avatar_status.xml +++ b/briar-android/res/layout/contact_avatar_status.xml @@ -9,10 +9,10 @@ <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/contactAvatar" + style="@style/BriarAvatar" android:layout_width="30dp" android:layout_height="30dp" app:civ_border_color="@color/action_bar_text" - app:civ_border_width="@dimen/avatar_border_width" tools:src="@drawable/ic_launcher"/> <ImageView diff --git a/briar-android/res/layout/dropdown_author.xml b/briar-android/res/layout/dropdown_author.xml index 524825ab6b..1af9c5965a 100644 --- a/briar-android/res/layout/dropdown_author.xml +++ b/briar-android/res/layout/dropdown_author.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" @@ -9,11 +8,11 @@ <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarView" + style="@style/BriarAvatar" android:layout_width="@dimen/dropdown_picture_size" android:layout_height="@dimen/dropdown_picture_size" android:layout_margin="@dimen/margin_small" - app:civ_border_color="@color/briar_primary" - app:civ_border_width="@dimen/avatar_border_width"/> + tools:src="@drawable/ic_launcher"/> <TextView android:id="@+id/nameView" diff --git a/briar-android/res/layout/introduction_message.xml b/briar-android/res/layout/introduction_message.xml index 5471817e29..5f72954196 100644 --- a/briar-android/res/layout/introduction_message.xml +++ b/briar-android/res/layout/introduction_message.xml @@ -24,6 +24,7 @@ <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarContact1" + style="@style/BriarAvatar" android:layout_width="@dimen/listitem_picture_size" android:layout_height="@dimen/listitem_picture_size" android:layout_centerHorizontal="true" @@ -31,8 +32,6 @@ android:layout_marginRight="@dimen/listitem_horizontal_margin" android:layout_toLeftOf="@+id/introductionIcon" android:layout_toStartOf="@+id/introductionIcon" - app:civ_border_color="@color/briar_primary" - app:civ_border_width="@dimen/avatar_border_width" tools:src="@drawable/ic_launcher"/> <ImageView @@ -45,6 +44,7 @@ <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarContact2" + style="@style/BriarAvatar" android:layout_width="@dimen/listitem_picture_size" android:layout_height="@dimen/listitem_picture_size" android:layout_centerHorizontal="true" @@ -53,8 +53,6 @@ android:layout_toEndOf="@+id/introductionIcon" android:layout_toRightOf="@+id/introductionIcon" android:transitionName="avatar" - app:civ_border_color="@color/briar_primary" - app:civ_border_width="@dimen/avatar_border_width" tools:src="@drawable/ic_launcher"/> </RelativeLayout> diff --git a/briar-android/res/layout/list_item_contact.xml b/briar-android/res/layout/list_item_contact.xml index e50fc03a8d..5658f85b00 100644 --- a/briar-android/res/layout/list_item_contact.xml +++ b/briar-android/res/layout/list_item_contact.xml @@ -17,6 +17,7 @@ <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarView" + style="@style/BriarAvatar" android:layout_width="@dimen/listitem_picture_size" android:layout_height="@dimen/listitem_picture_size" android:layout_alignParentLeft="true" @@ -24,8 +25,6 @@ android:layout_centerVertical="true" android:layout_marginLeft="@dimen/listitem_horizontal_margin" android:layout_marginStart="@dimen/listitem_horizontal_margin" - app:civ_border_color="@color/briar_primary" - app:civ_border_width="@dimen/avatar_border_width" tools:src="@drawable/ic_launcher"/> <LinearLayout diff --git a/briar-android/res/layout/list_item_selectable_contact.xml b/briar-android/res/layout/list_item_selectable_contact.xml index ac1a74504b..7977e42066 100644 --- a/briar-android/res/layout/list_item_selectable_contact.xml +++ b/briar-android/res/layout/list_item_selectable_contact.xml @@ -14,6 +14,7 @@ <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarView" + style="@style/BriarAvatar" android:layout_width="@dimen/listitem_selectable_picture_size" android:layout_height="@dimen/listitem_selectable_picture_size" android:layout_alignParentLeft="true" @@ -22,8 +23,6 @@ android:layout_marginLeft="@dimen/listitem_horizontal_margin" android:layout_marginStart="@dimen/listitem_horizontal_margin" android:transitionName="avatar" - app:civ_border_color="@color/briar_primary" - app:civ_border_width="@dimen/avatar_border_width" tools:src="@drawable/ic_launcher"/> <TextView diff --git a/briar-android/res/layout/text_avatar_view.xml b/briar-android/res/layout/text_avatar_view.xml index a154d9d4a1..f9eebbbdfc 100644 --- a/briar-android/res/layout/text_avatar_view.xml +++ b/briar-android/res/layout/text_avatar_view.xml @@ -1,18 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - xmlns:app="http://schemas.android.com/apk/res-auto"> + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> <de.hdodenhof.circleimageview.CircleImageView android:id="@+id/avatarBackground" + style="@style/BriarAvatar" android:layout_width="@dimen/avatar_forum_size" android:layout_height="@dimen/avatar_forum_size" android:layout_gravity="center" android:src="@android:color/transparent" - app:civ_fill_color="@color/briar_button_positive" - app:civ_border_color="@color/briar_primary" - app:civ_border_width="@dimen/avatar_border_width"/> + app:civ_fill_color="@color/briar_button_positive"/> <android.support.v7.widget.AppCompatTextView android:id="@+id/textAvatarView" @@ -29,4 +28,3 @@ tools:text="T"/> </merge> - diff --git a/briar-android/res/values/color.xml b/briar-android/res/values/color.xml index 7fa718ebda..a0d9584b26 100644 --- a/briar-android/res/values/color.xml +++ b/briar-android/res/values/color.xml @@ -18,7 +18,7 @@ <color name="horizontal_border">#CCCCCC</color> <color name="forums_available_background">@color/briar_gold</color> <color name="no_private_messages">#AAAAAA</color> - <color name="forum_avatar_shadow">#b3b3b3</color> + <color name="forum_avatar_shadow">#99000000</color> <color name="briar_primary">@color/briar_blue</color> <color name="briar_primary_dark">@color/briar_blue_dark</color> diff --git a/briar-android/res/values/dimens.xml b/briar-android/res/values/dimens.xml index a1e8fcf352..96e5c86fc5 100644 --- a/briar-android/res/values/dimens.xml +++ b/briar-android/res/values/dimens.xml @@ -29,7 +29,7 @@ <dimen name="listitem_selectable_picture_size">40dp</dimen> <dimen name="dropdown_picture_size">32dp</dimen> <dimen name="avatar_forum_size">48dp</dimen> - <dimen name="avatar_border_width">1dp</dimen> + <dimen name="avatar_border_width">2dp</dimen> <dimen name="message_bubble_margin_tail">14dp</dimen> <dimen name="message_bubble_margin_non_tail">51dp</dimen> diff --git a/briar-android/res/values/styles.xml b/briar-android/res/values/styles.xml index 7b328e17f3..d0a190b9f8 100644 --- a/briar-android/res/values/styles.xml +++ b/briar-android/res/values/styles.xml @@ -112,6 +112,14 @@ <item name="android:layout_height">1dp</item> </style> + <style name="BriarAvatar"> + <item name="civ_border_width">@dimen/avatar_border_width</item> + <item name="civ_border_color">@color/briar_primary</item> + + <!-- Remove when we are using 'de.hdodenhof:circleimageview:2.1.0' --> + <item name="civ_border_overlay">true</item> + </style> + <style name="NavMenuButton" parent="Widget.AppCompat.Button.Borderless.Colored"> <item name="android:textSize">@dimen/text_size_medium</item> <item name="android:textColor">@android:color/tertiary_text_light</item> -- GitLab