aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-10 22:35:12 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-10 22:35:12 +0100
commit23294c5737f0759595ee6ee6e9d89f214208c7b2 (patch)
tree0ab7e15d39f3ea28448ce8229f7319c138d7e2ec /src
parent53e2f9608d1608d9bad7124ef129725dbbb7f9f5 (diff)
changed message bubbles from PNG to XML
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java6
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_received.9.pngbin375 -> 0 bytes
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_received_warning.9.pngbin384 -> 0 bytes
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_sent.9.pngbin355 -> 0 bytes
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_sent_white.9.pngbin338 -> 0 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_received.9.pngbin266 -> 0 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_received_warning.9.pngbin265 -> 0 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_sent.9.pngbin247 -> 0 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_sent_white.9.pngbin241 -> 0 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_received.9.pngbin523 -> 0 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_received_warning.9.pngbin526 -> 0 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_sent.9.pngbin492 -> 0 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_sent_white.9.pngbin468 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_received.9.pngbin868 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.pngbin875 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_sent.9.pngbin754 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_sent_white.9.pngbin734 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_received.9.pngbin1232 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.pngbin1224 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_sent.9.pngbin1071 -> 0 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_sent_white.9.pngbin1044 -> 0 bytes
-rw-r--r--src/main/res/drawable/message_border.xml2
-rw-r--r--src/main/res/drawable/message_bubble_received_lightred.xml21
-rw-r--r--src/main/res/drawable/message_bubble_received_white.xml21
-rw-r--r--src/main/res/drawable/message_bubble_sent_lightblue.xml21
-rw-r--r--src/main/res/drawable/message_bubble_sent_white.xml21
-rw-r--r--src/main/res/layout/contact.xml2
-rw-r--r--src/main/res/layout/conversation_list_row.xml4
-rw-r--r--src/main/res/layout/message_received.xml17
-rw-r--r--src/main/res/layout/message_sent.xml15
-rw-r--r--src/main/res/values/colors.xml4
31 files changed, 112 insertions, 22 deletions
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 f8eb6e044..fa65b3af6 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -933,10 +933,10 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
if (type == RECEIVED) {
if (isInValidSession) {
- viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received);
+ viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_white);
viewHolder.encryption.setVisibility(View.GONE);
} else {
- viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_warning);
+ viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_lightred);
viewHolder.encryption.setVisibility(View.VISIBLE);
if (omemoEncryption && !message.isTrusted()) {
viewHolder.encryption.setText(R.string.not_trusted);
@@ -950,7 +950,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
if (mUseWhiteBackground) {
viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_sent_white);
} else {
- viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_sent);
+ viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_sent_lightblue);
}
}
diff --git a/src/main/res/drawable-hdpi/message_bubble_received.9.png b/src/main/res/drawable-hdpi/message_bubble_received.9.png
deleted file mode 100644
index f4998a025..000000000
--- a/src/main/res/drawable-hdpi/message_bubble_received.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png
deleted file mode 100644
index a38d49f49..000000000
--- a/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-hdpi/message_bubble_sent.9.png b/src/main/res/drawable-hdpi/message_bubble_sent.9.png
deleted file mode 100644
index 93a120890..000000000
--- a/src/main/res/drawable-hdpi/message_bubble_sent.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-hdpi/message_bubble_sent_white.9.png b/src/main/res/drawable-hdpi/message_bubble_sent_white.9.png
deleted file mode 100644
index f97cde6c6..000000000
--- a/src/main/res/drawable-hdpi/message_bubble_sent_white.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_received.9.png b/src/main/res/drawable-mdpi/message_bubble_received.9.png
deleted file mode 100644
index 520e985ac..000000000
--- a/src/main/res/drawable-mdpi/message_bubble_received.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png
deleted file mode 100644
index 96c225577..000000000
--- a/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_sent.9.png b/src/main/res/drawable-mdpi/message_bubble_sent.9.png
deleted file mode 100644
index 0f96e8947..000000000
--- a/src/main/res/drawable-mdpi/message_bubble_sent.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_sent_white.9.png b/src/main/res/drawable-mdpi/message_bubble_sent_white.9.png
deleted file mode 100644
index 79ba75cb1..000000000
--- a/src/main/res/drawable-mdpi/message_bubble_sent_white.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_received.9.png b/src/main/res/drawable-xhdpi/message_bubble_received.9.png
deleted file mode 100644
index 2a0c14c1c..000000000
--- a/src/main/res/drawable-xhdpi/message_bubble_received.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png
deleted file mode 100644
index b9826d990..000000000
--- a/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xhdpi/message_bubble_sent.9.png
deleted file mode 100644
index d2cdeb9b3..000000000
--- a/src/main/res/drawable-xhdpi/message_bubble_sent.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_sent_white.9.png b/src/main/res/drawable-xhdpi/message_bubble_sent_white.9.png
deleted file mode 100644
index 170b6800e..000000000
--- a/src/main/res/drawable-xhdpi/message_bubble_sent_white.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received.9.png
deleted file mode 100644
index c5adfe791..000000000
--- a/src/main/res/drawable-xxhdpi/message_bubble_received.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png
deleted file mode 100644
index 7efb3b5b3..000000000
--- a/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png
deleted file mode 100644
index 69094d0e6..000000000
--- a/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_sent_white.9.png b/src/main/res/drawable-xxhdpi/message_bubble_sent_white.9.png
deleted file mode 100644
index 8c30fc880..000000000
--- a/src/main/res/drawable-xxhdpi/message_bubble_sent_white.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png
deleted file mode 100644
index 267de5f27..000000000
--- a/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png
deleted file mode 100644
index fef8d6eb5..000000000
--- a/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png
deleted file mode 100644
index 45576d85a..000000000
--- a/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_sent_white.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_sent_white.9.png
deleted file mode 100644
index 249002f89..000000000
--- a/src/main/res/drawable-xxxhdpi/message_bubble_sent_white.9.png
+++ /dev/null
Binary files differ
diff --git a/src/main/res/drawable/message_border.xml b/src/main/res/drawable/message_border.xml
index 73c7a6716..83eef8eb8 100644
--- a/src/main/res/drawable/message_border.xml
+++ b/src/main/res/drawable/message_border.xml
@@ -10,6 +10,6 @@
android:right="1.5dp"
android:top="1.5dp" />
- <solid android:color="@color/black12" />
+ <solid android:color="@color/grey500" />
</shape> \ No newline at end of file
diff --git a/src/main/res/drawable/message_bubble_received_lightred.xml b/src/main/res/drawable/message_bubble_received_lightred.xml
new file mode 100644
index 000000000..b3bf6d451
--- /dev/null
+++ b/src/main/res/drawable/message_bubble_received_lightred.xml
@@ -0,0 +1,21 @@
+<?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">
+ </corners>
+ <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>
+</shape> \ No newline at end of file
diff --git a/src/main/res/drawable/message_bubble_received_white.xml b/src/main/res/drawable/message_bubble_received_white.xml
new file mode 100644
index 000000000..9055bad70
--- /dev/null
+++ b/src/main/res/drawable/message_bubble_received_white.xml
@@ -0,0 +1,21 @@
+<?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">
+ </corners>
+ <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/realwhite">
+ </solid>
+</shape> \ No newline at end of file
diff --git a/src/main/res/drawable/message_bubble_sent_lightblue.xml b/src/main/res/drawable/message_bubble_sent_lightblue.xml
new file mode 100644
index 000000000..1ee3ad0c8
--- /dev/null
+++ b/src/main/res/drawable/message_bubble_sent_lightblue.xml
@@ -0,0 +1,21 @@
+<?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">
+ </corners>
+ <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>
+</shape> \ No newline at end of file
diff --git a/src/main/res/drawable/message_bubble_sent_white.xml b/src/main/res/drawable/message_bubble_sent_white.xml
new file mode 100644
index 000000000..7e627ed11
--- /dev/null
+++ b/src/main/res/drawable/message_bubble_sent_white.xml
@@ -0,0 +1,21 @@
+<?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">
+ </corners>
+ <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/realwhite">
+ </solid>
+</shape> \ No newline at end of file
diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml
index 92e6020c9..027b0d353 100644
--- a/src/main/res/layout/contact.xml
+++ b/src/main/res/layout/contact.xml
@@ -13,7 +13,7 @@
android:layout_alignParentLeft="true"
android:src="@drawable/ic_profile"
app:riv_border_width="1dp"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_corner_radius="5dp" />
<LinearLayout
diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
index 16d611ce9..c494e07d7 100644
--- a/src/main/res/layout/conversation_list_row.xml
+++ b/src/main/res/layout/conversation_list_row.xml
@@ -30,7 +30,7 @@
android:scaleType="centerCrop"
android:background="@drawable/message_border"
android:padding="1dp"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_border_width="1dp"
app:riv_corner_radius="5dp" />
@@ -83,7 +83,7 @@
android:id="@+id/conversation_lastimage"
android:layout_width="wrap_content"
android:layout_height="36dp"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_border_width="1dp"
android:scaleType="centerCrop"
android:visibility="gone"
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 9717081a8..45808695e 100644
--- a/src/main/res/layout/message_received.xml
+++ b/src/main/res/layout/message_received.xml
@@ -19,7 +19,7 @@
android:scaleType="fitXY"
android:src="@drawable/ic_profile"
app:riv_border_width="1dip"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_corner_radius="5dp" />
<LinearLayout
@@ -28,11 +28,12 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/message_photo"
- android:background="@drawable/message_bubble_received"
- android:minHeight="53dp"
- android:layout_marginTop="-2dp"
- android:layout_marginRight="-4dp"
- android:longClickable="true">
+ android:minHeight="48dp"
+ android:longClickable="true"
+ android:layout_marginBottom="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginRight="4dp"
+ android:layout_marginTop="-4dp">
<LinearLayout
android:layout_width="wrap_content"
@@ -45,11 +46,11 @@
android:id="@+id/message_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="2dp"
android:layout_marginBottom="4dp"
android:adjustViewBounds="true"
app:riv_border_width="1dp"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_corner_radius="5dp"
android:scaleType="centerCrop"
android:longClickable="true"
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index d1923df71..b45da4470 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -20,7 +20,7 @@
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
app:riv_border_width="1dp"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_corner_radius="5dp" />
<LinearLayout
@@ -29,11 +29,12 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/message_photo"
- android:background="@drawable/message_bubble_sent"
- android:minHeight="53dp"
- android:layout_marginLeft="-4dp"
+ android:minHeight="48dp"
android:longClickable="true"
- android:layout_marginBottom="-4dp">
+ android:layout_marginBottom="0dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginRight="4dp"
+ android:layout_marginTop="4dp" >
<LinearLayout
android:layout_width="wrap_content"
@@ -46,12 +47,12 @@
android:id="@+id/message_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="2dp"
android:layout_marginBottom="4dp"
android:adjustViewBounds="true"
android:longClickable="true"
app:riv_border_width="1dp"
- app:riv_border_color="@color/black12"
+ app:riv_border_color="@color/grey500"
app:riv_corner_radius="5dp"
android:scaleType="centerCrop"
android:maxHeight="400dp"
diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml
index c497997f1..6a3d28c63 100644
--- a/src/main/res/values/colors.xml
+++ b/src/main/res/values/colors.xml
@@ -17,4 +17,8 @@
<color name="red800">#ffc62828</color>
<color name="orange500">#ffff9800</color>
<color name="bubble">#ff2e4272</color>
+ <color name="realwhite">#ffffffff</color>
+ <color name="darkwhite">#ffe6e6e6</color>
+ <color name="lightblue">#ffc7d1e8</color>
+ <color name="lightred">#ffd55555</color>
</resources>