Merge pull request #262 from genofire/mini-redesign
design message border
This commit is contained in:
commit
dccfc8c5cb
23 changed files with 67 additions and 141 deletions
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in a new issue