diff options
Diffstat (limited to 'src/main')
27 files changed, 84 insertions, 253 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 0858c7c03..4c5cfddad 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -1164,7 +1164,6 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke binding.textinput.addTextChangedListener(new StylingHelper.MessageEditorStyler(binding.textinput)); binding.textinput.setOnEditorActionListener(mEditorActionListener); binding.textinput.setRichContentListener(new String[]{"image/*"}, mEditorContentListener); - binding.messageInputBox.setBackgroundResource(messageInputBubble(false)); binding.textSendButton.setOnClickListener(this.mSendButtonListener); binding.textSendButton.setOnLongClickListener(this.mSendButtonLongListener); @@ -2638,7 +2637,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke public void updateSendButton() { updateChatMsgHint(); - binding.messageInputBox.setBackgroundResource(messageInputBubble(isPrivateMessage())); + messageListAdapter.setBubbleBackgroundColor(binding.messageInputBox, activity.getThemeColor(), 0, isPrivateMessage(), true); boolean hasAttachments = mediaPreviewAdapter != null && mediaPreviewAdapter.hasAttachments(); boolean useSendButtonToIndicateStatus = activity != null && PreferenceManager.getDefaultSharedPreferences(activity).getBoolean("send_button_status", getResources().getBoolean(R.bool.send_button_status)); final Conversation c = this.conversation; @@ -3094,10 +3093,6 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } } - private int messageInputBubble(final boolean isPrivate) { - return isPrivate ? activity.isOrangeTheme() ? activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark_orange_private : R.drawable.message_bubble_sent_orange_private : activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark_private : R.drawable.message_bubble_sent_private : activity.isOrangeTheme() ? activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark_orange : R.drawable.message_bubble_sent_orange : activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent; - } - public Conversation getConversation() { return conversation; } diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 18604d4e5..23b2120e3 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -25,6 +25,7 @@ import android.graphics.Color; import android.graphics.Point; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; +import android.graphics.drawable.GradientDrawable; import android.media.AudioManager; import android.net.ConnectivityManager; import android.net.Uri; @@ -50,6 +51,7 @@ import android.widget.Toast; import androidx.annotation.BoolRes; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatDelegate; @@ -426,6 +428,19 @@ public abstract class XmppActivity extends ActionBarActivity { return getStringPreference("theme_color", R.string.theme_color).equals("orange"); } + public String getThemeColor() { + return getStringPreference("theme_color", R.string.theme_color); + } + + public void setBubbleColor(final View v, final int backgroundColor, final int borderColor) { + GradientDrawable shape = (GradientDrawable)v.getBackground(); + shape.setColor(backgroundColor); + if (borderColor != -1) { + shape.setStroke(2, borderColor); + } + v.setBackground(shape); + } + public int getThemeResource(int r_attr_name, int r_drawable_def) { int[] attrs = {r_attr_name}; TypedArray ta = this.getTheme().obtainStyledAttributes(attrs); diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 6e277f0f2..8e7577f6f 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -7,6 +7,7 @@ import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.graphics.Rect; import android.graphics.Typeface; +import android.graphics.drawable.GradientDrawable; import android.net.Uri; import android.preference.PreferenceManager; import android.text.Editable; @@ -82,6 +83,7 @@ import de.pixart.messenger.utils.Emoticons; import de.pixart.messenger.utils.GeoHelper; import de.pixart.messenger.utils.RichPreview; import de.pixart.messenger.utils.StylingHelper; +import de.pixart.messenger.utils.ThemeHelper; import de.pixart.messenger.utils.UIHelper; import de.pixart.messenger.xmpp.mam.MamReference; import pl.droidsonroids.gif.GifImageView; @@ -726,7 +728,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie viewHolder.richlinkview.setLayoutParams(layoutParams); final String url = body.toString(); String weburl; - final String lcUrl = url.toLowerCase(Locale.US); + final String lcUrl = url.toLowerCase(Locale.US).trim(); if (lcUrl.startsWith("http://") || lcUrl.startsWith("https://")) { weburl = removeTrailingBracket(url); } else { @@ -872,6 +874,11 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie private void toggleWhisperInfo(ViewHolder viewHolder, final Message message, final boolean includeBody, final boolean darkBackground) { SpannableStringBuilder messageBody = new SpannableStringBuilder(replaceYoutube(activity.getApplicationContext(), message.getBody())); Editable body; + if (darkBackground) { + viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1_OnDark); + } else { + viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1); + } if (message.isPrivateMessage()) { final String privateMarker; if (message.getStatus() <= Message.STATUS_RECEIVED) { @@ -1000,7 +1007,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } boolean darkBackground = activity.isDarkTheme(); - boolean isOrange = activity.isOrangeTheme(); if (type == DATE_SEPARATOR) { if (UIHelper.today(message.getTimeSent())) { @@ -1140,23 +1146,11 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie if (type == RECEIVED) { if (isInValidSession) { - if (message.isPrivateMessage()) { - if (activity.isOrangeTheme()) { - viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_light_orange_dark_private : R.drawable.message_bubble_received_light_orange_private); - } else { - viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_light_dark_private : R.drawable.message_bubble_received_light_private); - } - } else { - viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_light_dark : R.drawable.message_bubble_received_light); - } + setBubbleBackgroundColor(viewHolder.message_box, activity.getThemeColor(), type, message.isPrivateMessage(), isInValidSession); viewHolder.encryption.setVisibility(View.GONE); viewHolder.encryption.setTextColor(this.getMessageTextColor(darkBackground, false)); } else { - if (message.isPrivateMessage()) { - viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_warning_dark : R.drawable.message_bubble_received_warning); - } else { - viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_warning_dark : R.drawable.message_bubble_received_warning); - } + setBubbleBackgroundColor(viewHolder.message_box, activity.getThemeColor(), type, message.isPrivateMessage(), isInValidSession); viewHolder.encryption.setVisibility(View.VISIBLE); viewHolder.encryption.setTextColor(this.getWarningTextColor(darkBackground)); if (omemoEncryption && !message.isTrusted()) { @@ -1168,19 +1162,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } if (type == SENT) { - if (message.isPrivateMessage()) { - if (activity.isOrangeTheme()) { - viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark_orange_private : R.drawable.message_bubble_sent_orange_private); - } else { - viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark_private : R.drawable.message_bubble_sent_private); - } - } else { - if (activity.isOrangeTheme()) { - viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark_orange : R.drawable.message_bubble_sent_orange ); - } else { - viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent); - } - } + setBubbleBackgroundColor(viewHolder.message_box, activity.getThemeColor(), type, message.isPrivateMessage(), isInValidSession); } displayStatus(viewHolder, message, type, darkBackground); return view; @@ -1374,4 +1356,36 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie public void onDestroyActionMode(ActionMode mode) { } } + + public void setBubbleBackgroundColor(final View viewHolder, final String themeColor, final int type, final boolean isPrivateMessage, final boolean isInValidSession) { + if (type == RECEIVED) { + if (isInValidSession) { + if (isPrivateMessage) { + viewHolder.setBackgroundResource(R.drawable.message_bubble_received_light_private); + activity.setBubbleColor(viewHolder, StyledAttributes.getColor(activity, R.attr.color_bubble_light), StyledAttributes.getColor(activity, R.attr.colorAccent)); + } else { + viewHolder.setBackgroundResource(R.drawable.message_bubble_received_light); + activity.setBubbleColor(viewHolder, StyledAttributes.getColor(activity, R.attr.color_bubble_light), -1); + } + } else { + if (isPrivateMessage) { + viewHolder.setBackgroundResource(R.drawable.message_bubble_received_warning_private); + activity.setBubbleColor(viewHolder, StyledAttributes.getColor(activity, R.attr.color_bubble_warning), StyledAttributes.getColor(activity, R.attr.colorAccent)); + } else { + viewHolder.setBackgroundResource(R.drawable.message_bubble_received_warning); + activity.setBubbleColor(viewHolder, StyledAttributes.getColor(activity, R.attr.color_bubble_warning), -1); + } + } + } + + if (type == SENT) { + if (isPrivateMessage) { + viewHolder.setBackgroundResource(R.drawable.message_bubble_sent_private); + activity.setBubbleColor(viewHolder, StyledAttributes.getColor(activity, R.attr.color_bubble_dark), StyledAttributes.getColor(activity, R.attr.colorAccent)); + } else { + viewHolder.setBackgroundResource(R.drawable.message_bubble_sent); + activity.setBubbleColor(viewHolder, StyledAttributes.getColor(activity, R.attr.color_bubble_dark), -1); + } + } + } }
\ No newline at end of file diff --git a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java index 738d2d685..9a326b638 100644 --- a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java +++ b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java @@ -61,7 +61,7 @@ public class ThemeHelper { final String themeColor = sharedPreferences.getString("theme_color", resources.getString(R.string.theme_color)); final String fontSize = sharedPreferences.getString("font_size", resources.getString(R.string.default_font_size)); switch (themeColor) { - case "c": + case "blue": switch (fontSize) { case "medium": return dark ? R.style.ConversationsTheme_Dark_Medium : R.style.ConversationsTheme_Medium; diff --git a/src/main/res/drawable/message_bubble_received_light.xml b/src/main/res/drawable/message_bubble_received_light.xml index c1a8b456b..a895b4bda 100644 --- a/src/main/res/drawable/message_bubble_received_light.xml +++ b/src/main/res/drawable/message_bubble_received_light.xml @@ -10,5 +10,5 @@ android:left="6dp" android:right="6dp" android:top="2dp" /> - <solid android:color="@color/lightwhite" /> + <solid android:color="@color/lightblue" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_light_dark.xml b/src/main/res/drawable/message_bubble_received_light_dark.xml deleted file mode 100644 index 301f634bc..000000000 --- a/src/main/res/drawable/message_bubble_received_light_dark.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="2dp" - android:left="6dp" - android:right="6dp" - android:top="2dp" /> - <solid android:color="@color/darkwhite" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_light_dark_private.xml b/src/main/res/drawable/message_bubble_received_light_dark_private.xml deleted file mode 100644 index 28bdb9b15..000000000 --- a/src/main/res/drawable/message_bubble_received_light_dark_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent"/> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="2dp" - android:left="6dp" - android:right="6dp" - android:top="2dp" /> - <solid android:color="@color/darkwhite" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_light_orange_dark_private.xml b/src/main/res/drawable/message_bubble_received_light_orange_dark_private.xml deleted file mode 100644 index cf7d44c87..000000000 --- a/src/main/res/drawable/message_bubble_received_light_orange_dark_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent_orange"/> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="2dp" - android:left="6dp" - android:right="6dp" - android:top="2dp" /> - <solid android:color="@color/darkwhite" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_light_orange_private.xml b/src/main/res/drawable/message_bubble_received_light_orange_private.xml deleted file mode 100644 index e22a46996..000000000 --- a/src/main/res/drawable/message_bubble_received_light_orange_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent_orange"/> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="2dp" - android:left="6dp" - android:right="6dp" - android:top="2dp" /> - <solid android:color="@color/lightwhite" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_light_private.xml b/src/main/res/drawable/message_bubble_received_light_private.xml index 6752d9393..657f8dad0 100644 --- a/src/main/res/drawable/message_bubble_received_light_private.xml +++ b/src/main/res/drawable/message_bubble_received_light_private.xml @@ -11,5 +11,5 @@ android:left="6dp" android:right="6dp" android:top="2dp" /> - <solid android:color="@color/lightwhite" /> + <solid android:color="@color/lightblue" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_warning.xml b/src/main/res/drawable/message_bubble_received_warning.xml index cd47cf948..42e7e8f71 100644 --- a/src/main/res/drawable/message_bubble_received_warning.xml +++ b/src/main/res/drawable/message_bubble_received_warning.xml @@ -10,5 +10,5 @@ android:left="6dp" android:right="6dp" android:top="4dp" /> - <solid android:color="@color/lightred" /> + <solid android:color="?attr/color_bubble_warning" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_warning_dark.xml b/src/main/res/drawable/message_bubble_received_warning_dark.xml deleted file mode 100644 index e25ef23a2..000000000 --- a/src/main/res/drawable/message_bubble_received_warning_dark.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkred" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_warning_dark_private.xml b/src/main/res/drawable/message_bubble_received_warning_dark_private.xml deleted file mode 100644 index 758d6d2e8..000000000 --- a/src/main/res/drawable/message_bubble_received_warning_dark_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent"/> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkred" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_warning_orange_dark_private.xml b/src/main/res/drawable/message_bubble_received_warning_orange_dark_private.xml deleted file mode 100644 index 5f0525113..000000000 --- a/src/main/res/drawable/message_bubble_received_warning_orange_dark_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent_orange"/> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkred" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_warning_orange_private.xml b/src/main/res/drawable/message_bubble_received_warning_orange_private.xml deleted file mode 100644 index 08bd30406..000000000 --- a/src/main/res/drawable/message_bubble_received_warning_orange_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent_orange"/> - <corners - android:topLeftRadius="0dp" - android:topRightRadius="5dp" - android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/lightred" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_received_warning_private.xml b/src/main/res/drawable/message_bubble_received_warning_private.xml index 6aef6105e..c5c4ce4ac 100644 --- a/src/main/res/drawable/message_bubble_received_warning_private.xml +++ b/src/main/res/drawable/message_bubble_received_warning_private.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent"/> + <stroke android:width="2dp" android:color="?attr/colorAccent"/> <corners android:topLeftRadius="0dp" android:topRightRadius="5dp" @@ -11,5 +11,5 @@ android:left="6dp" android:right="6dp" android:top="4dp" /> - <solid android:color="@color/lightred" /> + <solid android:color="?attr/color_bubble_warning" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent.xml b/src/main/res/drawable/message_bubble_sent.xml index 677c1fe43..3cbe163ec 100644 --- a/src/main/res/drawable/message_bubble_sent.xml +++ b/src/main/res/drawable/message_bubble_sent.xml @@ -10,5 +10,5 @@ android:left="6dp" android:right="6dp" android:top="4dp" /> - <solid android:color="@color/lightblue" /> + <solid android:color="@color/darkblue" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_dark.xml b/src/main/res/drawable/message_bubble_sent_dark.xml deleted file mode 100644 index 3cbe163ec..000000000 --- a/src/main/res/drawable/message_bubble_sent_dark.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <corners - android:topLeftRadius="5dp" - android:topRightRadius="5dp" - android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkblue" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_dark_orange.xml b/src/main/res/drawable/message_bubble_sent_dark_orange.xml deleted file mode 100644 index 6e81cabe7..000000000 --- a/src/main/res/drawable/message_bubble_sent_dark_orange.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <corners - android:topLeftRadius="5dp" - android:topRightRadius="5dp" - android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkorange" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_dark_orange_private.xml b/src/main/res/drawable/message_bubble_sent_dark_orange_private.xml deleted file mode 100644 index 33b726220..000000000 --- a/src/main/res/drawable/message_bubble_sent_dark_orange_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent_orange"/> - <corners - android:topLeftRadius="5dp" - android:topRightRadius="5dp" - android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkorange" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_dark_private.xml b/src/main/res/drawable/message_bubble_sent_dark_private.xml deleted file mode 100644 index e37c43ad3..000000000 --- a/src/main/res/drawable/message_bubble_sent_dark_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent"/> - <corners - android:topLeftRadius="5dp" - android:topRightRadius="5dp" - android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/darkblue" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_orange.xml b/src/main/res/drawable/message_bubble_sent_orange.xml deleted file mode 100644 index a6ab35a46..000000000 --- a/src/main/res/drawable/message_bubble_sent_orange.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <corners - android:topLeftRadius="5dp" - android:topRightRadius="5dp" - android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/lightorange" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_orange_private.xml b/src/main/res/drawable/message_bubble_sent_orange_private.xml deleted file mode 100644 index fca639dfd..000000000 --- a/src/main/res/drawable/message_bubble_sent_orange_private.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> - <stroke android:width="2dp" android:color="@color/accent_orange"/> - <corners - android:topLeftRadius="5dp" - android:topRightRadius="5dp" - android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp" /> - <padding - android:bottom="4dp" - android:left="6dp" - android:right="6dp" - android:top="4dp" /> - <solid android:color="@color/lightorange" /> -</shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_private.xml b/src/main/res/drawable/message_bubble_sent_private.xml index e83ded310..e37c43ad3 100644 --- a/src/main/res/drawable/message_bubble_sent_private.xml +++ b/src/main/res/drawable/message_bubble_sent_private.xml @@ -11,5 +11,5 @@ android:left="6dp" android:right="6dp" android:top="4dp" /> - <solid android:color="@color/lightblue" /> + <solid android:color="@color/darkblue" /> </shape>
\ No newline at end of file diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index d51172093..16a35eb2b 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -113,7 +113,7 @@ <attr name="popupOverlayStyle" format="reference" /> <attr name="color_bubble_light" format="reference|color" /> - <attr name="color_bubble_blue" format="reference|color" /> + <attr name="color_bubble_dark" format="reference|color" /> <attr name="color_bubble_date" format="reference|color" /> <attr name="color_bubble_warning" format="reference|color" /> diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml index e8f3b0d79..67ffc3423 100644 --- a/src/main/res/values/colors.xml +++ b/src/main/res/values/colors.xml @@ -8,7 +8,7 @@ <color name="primary_dark_orange">#ffB27300</color> <color name="primary_orange_dark">#ffce8500</color> <color name="primary_dark_orange_dark">#ffa06700</color> - <color name="accent_orange">#ffffa500 </color> + <color name="accent_orange">#ffffa500</color> <color name="accent">#ff0091ea</color> <!-- light blue accent --> <color name="black">#ff000000</color> @@ -51,7 +51,9 @@ <color name="darkred">#ffb71c1c</color> <!-- red 900 --> <color name="darkgreen">#ff1b5e20</color> <!-- green 900 --> - <color name="lightorange">#fffff6e5</color> <!-- blue 100 --> + <color name="lightorange">#ffffb732</color> + <color name="lightorange2">#ffcc8400</color> + <color name="middleorange">#ff996300</color> <color name="darkorange">#ff4c3100</color> <color name="online">#ff388e3c</color> <!-- green 700 --> diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index de539df44..ea5230cef 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -26,7 +26,7 @@ <item name="EmojiColor">@color/realblack</item> <item name="color_bubble_light">@color/lightwhite</item> - <item name="color_bubble_blue">@color/lightblue</item> + <item name="color_bubble_dark">@color/lightblue</item> <item name="color_bubble_date">@color/lightgreen</item> <item name="color_bubble_warning">@color/lightred</item> @@ -185,7 +185,7 @@ <item name="EmojiColor">@color/realwhite</item> <item name="color_bubble_light">@color/darkwhite</item> - <item name="color_bubble_blue">@color/darkblue</item> + <item name="color_bubble_dark">@color/darkblue</item> <item name="color_bubble_date">@color/darkgreen</item> <item name="color_bubble_warning">@color/darkred</item> @@ -325,6 +325,11 @@ <item name="colorAccent">@color/accent_orange</item> <item name="colorControlNormal">@color/accent_orange</item> <item name="colorControlActivated">@color/accent_orange</item> + + <item name="color_bubble_light">@color/lightorange</item> + <item name="color_bubble_dark">@color/lightorange2</item> + <item name="color_bubble_date">@color/darkred</item> + <item name="color_bubble_warning">@color/darkgreen</item> </style> <style name="ConversationsTheme.Orange.Dark" parent="ConversationsTheme.Dark"> @@ -333,6 +338,11 @@ <item name="colorAccent">@color/accent_orange</item> <item name="colorControlNormal">@color/accent_orange</item> <item name="colorControlActivated">@color/accent_orange</item> + + <item name="color_bubble_light">@color/middleorange</item> + <item name="color_bubble_dark">@color/darkorange</item> + <item name="color_bubble_date">@color/darkred</item> + <item name="color_bubble_warning">@color/darkgreen</item> </style> <style name="ConversationsTheme.Dialog" parent="@style/Theme.AppCompat.Light.Dialog"> |