diff options
author | Daniel Bailey <daniel.bailey@grappleIT.co.uk> | 2019-06-26 22:53:43 +0300 |
---|---|---|
committer | Mario Đanić <mario.danic@gmail.com> | 2019-08-09 18:56:37 +0300 |
commit | f384651c813a651a90c312e0f4c5ea79d4f215d7 (patch) | |
tree | c65eed03daac6733ad91b494838fa72794608d0c /app/src/main | |
parent | 8a013cb83724c064ecdb169f47a72cbe321a012c (diff) |
Altered colours used by system message bubble and @ avatars.
Signed-off-by: Daniel Bailey <daniel.bailey@grappleIT.co.uk>
Diffstat (limited to 'app/src/main')
5 files changed, 28 insertions, 10 deletions
diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java index 28fafa90b..9ad881e94 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicSystemMessageViewHolder.java @@ -54,19 +54,26 @@ public class MagicSystemMessageViewHolder extends MessageHolders.IncomingTextMes super.onBind(message); Resources resources = NextcloudTalkApplication.getSharedApplication().getResources(); + int normalColor, pressedColor, mentionYouColor, mentionOthersColor; - int normalColor = appPreferences.isDarkThemeEnabled() ? resources.getColor(R.color.bg_system_bubble_dark) : - resources.getColor(R.color.white_two); - int pressedColor = normalColor; + if(appPreferences.isDarkThemeEnabled()) { + normalColor = resources.getColor(R.color.bg_system_bubble_dark); + mentionYouColor = resources.getColor(R.color.fg_mention_you_dark); + mentionOthersColor = resources.getColor(R.color.fg_mention_others_dark); + } else { + normalColor = resources.getColor(R.color.white_two); + mentionYouColor = resources.getColor(R.color.fg_mention_you); + mentionOthersColor = resources.getColor(R.color.fg_mention_others); + } + pressedColor = normalColor; Drawable bubbleDrawable = DisplayUtils.getMessageSelector(normalColor, - resources.getColor(R.color.transparent), pressedColor, - R.drawable.shape_grouped_incoming_message); + resources.getColor(R.color.transparent), pressedColor, + R.drawable.shape_grouped_incoming_message); ViewCompat.setBackground(bubble, bubbleDrawable); Spannable messageString = new SpannableString(message.getText()); - Context context = NextcloudTalkApplication.getSharedApplication().getApplicationContext(); if (message.getMessageParameters() != null && message.getMessageParameters().size() > 0) { for (String key : message.getMessageParameters().keySet()) { Map<String, String> individualHashMap = message.getMessageParameters().get(key); @@ -74,9 +81,9 @@ public class MagicSystemMessageViewHolder extends MessageHolders.IncomingTextMes if (individualHashMap != null && (individualHashMap.get("type").equals("user") || individualHashMap.get("type").equals("guest") || individualHashMap.get("type").equals("call"))) { if (individualHashMap.get("id").equals(message.getActiveUser().getUserId())) { - color = context.getResources().getColor(R.color.nc_incoming_text_mention_you); + color = mentionYouColor; } else { - color = context.getResources().getColor(R.color.nc_incoming_text_mention_others); + color = mentionOthersColor; } messageString = diff --git a/app/src/main/res/layout/controller_chat.xml b/app/src/main/res/layout/controller_chat.xml index dc844f811..4c6a317cd 100644 --- a/app/src/main/res/layout/controller_chat.xml +++ b/app/src/main/res/layout/controller_chat.xml @@ -81,7 +81,7 @@ app:pb_backgroundColor="@color/colorPrimary" app:pb_icon="@drawable/ic_baseline_arrow_downward_24px" app:pb_text="@string/nc_new_messages" - app:pb_textColor="@color/bg_default" /> + app:pb_textColor="@color/fg_inverse" /> <View android:id="@+id/separator" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index f918d8e2e..eeabb6353 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -31,6 +31,11 @@ <!-- Chat window incoming message text & informational --> <color name="nc_incoming_text_default">#8FADBD</color> + + <color name="nc_incoming_text_mention_you">#C98879</color> + <!--<color name="nc_incoming_text_mention_others">#3a718f</color>--> + <color name="nc_incoming_text_mention_others">@color/nc_darkRed</color> + <color name="bg_message_list_incoming_bubble">#444444</color> <color name="nc_grey">@android:color/holo_purple</color> <color name="bg_bottom_sheet">#222222</color> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index df85131f3..da132b5bf 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -55,6 +55,12 @@ <color name="fg_default">#000000</color> <color name="fg_inverse">#FFFFFF</color> + <color name="fg_mention_you">#C98879</color> + <color name="fg_mention_others">#37505D</color> + + <color name="fg_mention_you_dark">#C98879</color> + <color name="fg_mention_others_dark">#4c96bd</color> + <color name="bg_default">#FFFFFF</color> <color name="bg_alt">@color/white60</color> <color name="bg_system_bubble_dark">#444444</color> diff --git a/app/src/main/res/xml/chip_outgoing_own_mention.xml b/app/src/main/res/xml/chip_outgoing_own_mention.xml index 51d287570..28f7a4e4a 100644 --- a/app/src/main/res/xml/chip_outgoing_own_mention.xml +++ b/app/src/main/res/xml/chip_outgoing_own_mention.xml @@ -22,5 +22,5 @@ <chip xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:textAppearance="@style/ChipMentionTextAppearance" - app:chipBackgroundColor="@color/white" + app:chipBackgroundColor="@color/bg_default" app:closeIconEnabled="false" /> |