diff options
Diffstat (limited to '')
23 files changed, 67 insertions, 141 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index be4ca8af4..45929344c 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -3091,7 +3091,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } private int messageInputBubble() { - return activity.isDarkTheme() ? R.drawable.message_bubble_sent_blue_dark : R.drawable.message_bubble_sent_blue; + return activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent; } public Conversation getConversation() { 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 bc65fd68a..dd24c440d 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -211,6 +211,14 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } } + private int getWarningTextColor(boolean onDark) { + if (onDark) { + return ContextCompat.getColor(activity, R.color.white70); + } else { + return ContextCompat.getColor(activity, R.color.black26); + } + } + private void displayStatus(ViewHolder viewHolder, final Message message, int type, boolean darkBackground) { String filesize = null; String info = null; @@ -965,7 +973,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } else { viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_warning_dark: R.drawable.message_bubble_received_warning); viewHolder.encryption.setVisibility(View.VISIBLE); - viewHolder.encryption.setTextColor(activity.getWarningTextColor()); + viewHolder.encryption.setTextColor(this.getWarningTextColor(darkBackground)); if (omemoEncryption && !message.isTrusted()) { viewHolder.encryption.setText(R.string.not_trusted); } else { @@ -975,7 +983,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } if (type == SENT) { - viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_blue_dark : R.drawable.message_bubble_sent_blue); + viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent); } displayStatus(viewHolder, message, type, darkBackground); diff --git a/src/main/res/drawable/date_bubble.xml b/src/main/res/drawable/date_bubble.xml index 3edf349e9..6d9e2462e 100644 --- a/src/main/res/drawable/date_bubble.xml +++ b/src/main/res/drawable/date_bubble.xml @@ -4,18 +4,11 @@ android:topLeftRadius="5dp" android:topRightRadius="5dp" android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="6dp" android:left="6dp" android:right="6dp" android:top="6dp" /> - <stroke - android:width="1dp" - android:color="@color/grey500"> - </stroke> - <solid - android:color="@color/lightgreen"> - </solid> + <solid android:color="@color/lightgreen" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/date_bubble_dark.xml b/src/main/res/drawable/date_bubble_dark.xml index 345c315c1..3859b4d83 100644 --- a/src/main/res/drawable/date_bubble_dark.xml +++ b/src/main/res/drawable/date_bubble_dark.xml @@ -4,18 +4,11 @@ android:topLeftRadius="5dp" android:topRightRadius="5dp" android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="6dp" android:left="6dp" android:right="6dp" android:top="6dp" /> - <stroke - android:width="1dp" - android:color="@color/grey800"> - </stroke> - <solid - android:color="@color/darkgreen"> - </solid> + <solid android:color="@color/darkgreen" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/infocard_border.xml b/src/main/res/drawable/infocard_border.xml index ff3ec366a..61ddb5fc1 100644 --- a/src/main/res/drawable/infocard_border.xml +++ b/src/main/res/drawable/infocard_border.xml @@ -5,10 +5,6 @@ <corners android:radius="5dp" /> - <stroke - android:width="0.5dp" - android:color="@color/black12"></stroke> - <padding android:bottom="0dp" android:left="0dp" diff --git a/src/main/res/drawable/message_bubble_received_light.xml b/src/main/res/drawable/message_bubble_received_light.xml index 32e146460..c1a8b456b 100644 --- a/src/main/res/drawable/message_bubble_received_light.xml +++ b/src/main/res/drawable/message_bubble_received_light.xml @@ -4,18 +4,11 @@ android:topLeftRadius="0dp" android:topRightRadius="5dp" android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="2dp" android:left="6dp" android:right="6dp" android:top="2dp" /> - <stroke - android:width="1dp" - android:color="@color/grey500"> - </stroke> - <solid - android:color="@color/lightwhite"> - </solid> + <solid android:color="@color/lightwhite" /> </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 index 8f9132566..301f634bc 100644 --- a/src/main/res/drawable/message_bubble_received_light_dark.xml +++ b/src/main/res/drawable/message_bubble_received_light_dark.xml @@ -4,18 +4,11 @@ android:topLeftRadius="0dp" android:topRightRadius="5dp" android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="2dp" android:left="6dp" android:right="6dp" android:top="2dp" /> - <stroke - android:width="1dp" - android:color="@color/grey700"> - </stroke> - <solid - android:color="@color/darkwhite"> - </solid> + <solid android:color="@color/darkwhite" /> </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 b3bf6d451..cd47cf948 100644 --- a/src/main/res/drawable/message_bubble_received_warning.xml +++ b/src/main/res/drawable/message_bubble_received_warning.xml @@ -4,18 +4,11 @@ android:topLeftRadius="0dp" android:topRightRadius="5dp" android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="4dp" android:left="6dp" android:right="6dp" android:top="4dp" /> - <stroke - android:width="1dp" - android:color="@color/grey500"> - </stroke> - <solid - android:color="@color/lightred"> - </solid> + <solid android:color="@color/lightred" /> </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 index 5867f67ce..e25ef23a2 100644 --- a/src/main/res/drawable/message_bubble_received_warning_dark.xml +++ b/src/main/res/drawable/message_bubble_received_warning_dark.xml @@ -4,18 +4,11 @@ android:topLeftRadius="0dp" android:topRightRadius="5dp" android:bottomRightRadius="5dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="4dp" android:left="6dp" android:right="6dp" android:top="4dp" /> - <stroke - android:width="1dp" - android:color="@color/grey700"> - </stroke> - <solid - android:color="@color/darkred"> - </solid> + <solid android:color="@color/darkred" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_blue_dark.xml b/src/main/res/drawable/message_bubble_sent.xml index d9853bf74..677c1fe43 100644 --- a/src/main/res/drawable/message_bubble_sent_blue_dark.xml +++ b/src/main/res/drawable/message_bubble_sent.xml @@ -4,18 +4,11 @@ android:topLeftRadius="5dp" android:topRightRadius="5dp" android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="4dp" android:left="6dp" android:right="6dp" android:top="4dp" /> - <stroke - android:width="1dp" - android:color="@color/grey700"> - </stroke> - <solid - android:color="@color/darkblue"> - </solid> + <solid android:color="@color/lightblue" /> </shape>
\ No newline at end of file diff --git a/src/main/res/drawable/message_bubble_sent_blue.xml b/src/main/res/drawable/message_bubble_sent_dark.xml index 1ee3ad0c8..3cbe163ec 100644 --- a/src/main/res/drawable/message_bubble_sent_blue.xml +++ b/src/main/res/drawable/message_bubble_sent_dark.xml @@ -4,18 +4,11 @@ android:topLeftRadius="5dp" android:topRightRadius="5dp" android:bottomRightRadius="0dp" - android:bottomLeftRadius="5dp"> - </corners> + android:bottomLeftRadius="5dp" /> <padding android:bottom="4dp" android:left="6dp" android:right="6dp" android:top="4dp" /> - <stroke - android:width="1dp" - android:color="@color/grey500"> - </stroke> - <solid - android:color="@color/lightblue"> - </solid> + <solid android:color="@color/darkblue" /> </shape>
\ No newline at end of file diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml index e56ca6a95..9b638172a 100644 --- a/src/main/res/layout/account_row.xml +++ b/src/main/res/layout/account_row.xml @@ -15,8 +15,6 @@ android:layout_alignParentLeft="true" android:contentDescription="@string/account_image_description" android:padding="1dp" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <LinearLayout diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index b8c48a382..0742955d3 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -54,8 +54,6 @@ android:maxWidth="384dp" android:maxHeight="384dp" android:padding="1dp" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <LinearLayout diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 29400a246..bb5a375a4 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -156,8 +156,6 @@ android:maxHeight="384dp" android:padding="1dp" android:scaleType="centerCrop" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> </RelativeLayout> @@ -359,8 +357,6 @@ android:layout_alignParentEnd="false" android:layout_alignParentRight="false" android:padding="1dp" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <LinearLayout diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml index 0fb666365..ecb82f17e 100644 --- a/src/main/res/layout/activity_publish_profile_picture.xml +++ b/src/main/res/layout/activity_publish_profile_picture.xml @@ -51,8 +51,6 @@ android:maxHeight="384dp" android:padding="1dp" android:scaleType="centerCrop" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> </FrameLayout> diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml index 09e0ac9bf..a8f4ff499 100644 --- a/src/main/res/layout/contact.xml +++ b/src/main/res/layout/contact.xml @@ -13,8 +13,6 @@ android:layout_width="56dp" android:layout_height="56dp" android:layout_alignParentLeft="true" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <LinearLayout diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml index ed0e9e1cc..bfcf3bdca 100644 --- a/src/main/res/layout/conversation_list_row.xml +++ b/src/main/res/layout/conversation_list_row.xml @@ -24,8 +24,6 @@ android:layout_alignParentLeft="true" android:padding="1dp" android:scaleType="centerCrop" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <RelativeLayout diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index 8917333c1..3151f6401 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -91,7 +91,7 @@ android:layout_alignParentStart="true" android:layout_toLeftOf="@+id/textSendButton" android:layout_toStartOf="@+id/textSendButton" - android:background="@drawable/message_bubble_sent_blue" + android:background="@drawable/message_bubble_sent" android:orientation="horizontal" android:paddingTop="8dp" android:requiresFadingEdge="horizontal" @@ -108,7 +108,7 @@ android:layout_toLeftOf="@+id/textSendButton" android:layout_toRightOf="@+id/recordVoiceButton" android:layout_toStartOf="@+id/textSendButton" - android:background="@drawable/message_bubble_sent_blue" + android:background="@drawable/message_bubble_sent" android:ems="10" android:imeOptions="flagNoExtractUi|actionSend" android:inputType="textShortMessage|textMultiLine|textCapSentences" diff --git a/src/main/res/layout/message_content.xml b/src/main/res/layout/message_content.xml index 044f8c64d..296944565 100644 --- a/src/main/res/layout/message_content.xml +++ b/src/main/res/layout/message_content.xml @@ -13,8 +13,6 @@ android:maxHeight="500dp" android:maxWidth="500dp" android:scaleType="centerCrop" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <de.pixart.messenger.ui.widget.CopyTextView diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml index 2c6fd044a..dd4602b62 100644 --- a/src/main/res/layout/message_received.xml +++ b/src/main/res/layout/message_received.xml @@ -16,8 +16,6 @@ android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:scaleType="fitXY" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dip" app:riv_corner_radius="@dimen/rounded_image_border" /> <LinearLayout diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml index 2526e4dd2..a0defa5a6 100644 --- a/src/main/res/layout/message_sent.xml +++ b/src/main/res/layout/message_sent.xml @@ -23,8 +23,6 @@ android:layout_width="48dp" android:layout_height="48dp" android:scaleType="fitXY" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <View @@ -42,7 +40,7 @@ android:layout_marginRight="4dp" android:layout_toLeftOf="@+id/message_photo_box" android:layout_toStartOf="@+id/message_photo_box" - android:background="@drawable/message_bubble_sent_blue" + android:background="@drawable/message_bubble_sent" android:longClickable="true" android:minHeight="48dp"> diff --git a/src/main/res/layout/message_status.xml b/src/main/res/layout/message_status.xml index d42637175..bd731cbe4 100644 --- a/src/main/res/layout/message_status.xml +++ b/src/main/res/layout/message_status.xml @@ -29,8 +29,6 @@ android:padding="0dp" android:scaleType="fitXY" android:visibility="gone" - app:riv_border_color="?attr/color_border" - app:riv_border_width="1dp" app:riv_corner_radius="@dimen/rounded_image_border" /> <TextView diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml index 8dfec1519..936c5b36c 100644 --- a/src/main/res/values/colors.xml +++ b/src/main/res/values/colors.xml @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="realgreen">#ff259b24</color> - <color name="primary">#ff2e4272</color> - <color name="primary_dark">#ff08183e</color> - <color name="accent">#ff0091ea</color> + <color name="realgreen">#388e3c</color> <!-- green 700 --> + <color name="primary">#0D47A1</color> <!-- blue 900 --> + <color name="primary_dark">#1A237E</color> <!-- indigo 900 --> + <color name="accent">#ff0091ea</color> <!-- light blue accent --> <color name="black87">#de000309</color> <color name="black54">#8a000309</color> <color name="black26">#42000000</color> <color name="black12">#1f000000</color> - <color name="deep_purple_a100">#ffB388FF</color> - <color name="deep_purple_a200">#ff7C4DFF</color> - <color name="deep_purple_a400">#ff651FFF</color> - <color name="deep_purple_a700">#ff6200EA</color> - <color name="realblack">#ff000000</color> + <color name="deep_purple_a100">#ffB388FF</color> <!-- deep purple accent 100 --> + <color name="deep_purple_a200">#ff7C4DFF</color> <!-- deep purple accent 200 --> + <color name="deep_purple_a400">#ff651FFF</color> <!-- deep purple accent 400 --> + <color name="deep_purple_a700">#ff6200EA</color> <!-- deep purple accent 700 --> + <color name="realblack">#ff000000</color> <!-- black --> <color name="white">#ffe2e7f1</color> <color name="white12">#1fffffff</color> <color name="white70">#b2e2e7f1</color> <color name="white87">#deffffff</color> - <color name="green500">#ff4CAF50</color> - <color name="grey50">#fafafa</color> - <color name="grey200">#ffeeeeee</color> - <color name="grey300">#ffe0e0e0</color> - <color name="grey500">#ff9e9e9e</color> - <color name="grey700">#ff616161</color> - <color name="grey800">#ff424242</color> - <color name="grey900">#ff282828</color> - <color name="red800">#ffc62828</color> - <color name="red500">#fff44336</color> - <color name="red700">#ffd50000</color> - <color name="orange500">#ffff9800</color> - <color name="bubble">#ff2e4272</color> - <color name="realwhite">#ffffffff</color> + <color name="green500">#ff4CAF50</color> <!-- green 500 --> + <color name="grey50">#fafafa</color> <!-- grey 50 --> + <color name="grey200">#ffeeeeee</color> <!-- grey 200 --> + <color name="grey300">#ffe0e0e0</color> <!-- grey 300 --> + <color name="grey500">#ff9e9e9e</color> <!-- grey 500 --> + <color name="grey700">#ff616161</color> <!-- grey 700 --> + <color name="grey800">#ff424242</color> <!-- grey 800 --> + <color name="grey900">#212121</color> <!-- grey 900 --> + <color name="red800">#ffc62828</color> <!-- red 800 --> + <color name="red500">#fff44336</color> <!-- red 500 --> + <color name="red700">#d32f2f</color> <!-- red 700 --> + <color name="orange500">#ffff9800</color> <!-- orange 500 --> + <color name="bubble">#37474f</color> <!-- blue grey 800 --> + <color name="realwhite">#ffffffff</color> <!-- white --> <!-- bubbles --> - <color name="lightwhite">#fffafbfd</color> - <color name="darkwhite">#ff424242</color> - <color name="lightblue">#ffd7deee</color> - <color name="darkblue">#ff2e4272</color> - <color name="lightred">#fff5d9d9</color> - <color name="darkred">#ff521010</color> - <color name="lightgreen">#ffcaf2ca</color> - <color name="darkgreen">#ff165d15</color> + <color name="lightwhite">#fafafa</color> <!-- green 50 --> + <color name="lightblue">#bbdefb</color> <!-- blue 100 --> + <color name="lightred">#ffcdd2</color> <!-- red 100 --> + <color name="lightgreen">#c8e6c9</color> <!-- green 100 --> + <color name="darkwhite">#ff424242</color> <!-- grey 800 --> + <color name="darkblue">#37474f</color> <!-- blue grey 800 --> + <color name="darkred">#b71c1c</color> <!-- red 900 --> + <color name="darkgreen">#1b5e20</color> <!-- green 900 --> - <color name="online">#ff259b24</color> - <color name="away">#ffff9800</color> - <color name="notavailable">#fff44336</color> - <color name="warning_button">#fff5d9d9</color> - <color name="warning_button_dark">#ff521010</color> + <color name="online">#388e3c</color> <!-- green 700 --> + <color name="away">#ffff9800</color> <!-- orange 500 --> + <color name="notavailable">#fff44336</color> <!-- red 500 --> + <color name="warning_button">#ffcdd2</color> <!-- red 100 --> + <color name="warning_button_dark">#C62828</color> <!-- red 800 --> <!-- scanner --> - <color name="scan_result_dots">#c04CAF50</color> + <color name="scan_result_dots">#4caf50</color> <!-- green 500 --> </resources> |