diff --git a/build.gradle b/build.gradle
index da54ec554..4d53e85ae 100644
--- a/build.gradle
+++ b/build.gradle
@@ -86,6 +86,7 @@ subprojects {
AbstractTask : '0.9.5',
Dagger : '2.11',
StethoBeanShellREPL : '0.1',
+ MessageBubbleView : '3.5',
]
}
diff --git a/twidere/build.gradle b/twidere/build.gradle
index ec64610eb..ea3d9256e 100644
--- a/twidere/build.gradle
+++ b/twidere/build.gradle
@@ -21,7 +21,7 @@ buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:${kotlinVersion}"
- classpath 'com.github.mariotaku:imgenie-plugin:0.2.5'
+ classpath 'com.github.mariotaku:imgenie-plugin:0.2.6'
if (enableGoogleVariant) {
// START Non-FOSS component
@@ -226,7 +226,7 @@ dependencies {
implementation 'com.commonsware.cwac:layouts:0.4.3'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.pnikosis:materialish-progress:1.7'
- implementation 'com.github.mariotaku:MessageBubbleView:1.6'
+ implementation "com.github.mariotaku:MessageBubbleView:${libVersions['MessageBubbleView']}"
implementation 'com.github.mariotaku:DragSortListView:0.6.1'
implementation 'com.github.uucky:ColorPicker-Android:0.9.7@aar'
implementation "pl.droidsonroids.gif:android-gif-drawable:${libVersions['AndroidGIFDrawable']}"
diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageViewHolder.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageViewHolder.kt
index 4dd0721f2..857dc148e 100644
--- a/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageViewHolder.kt
+++ b/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageViewHolder.kt
@@ -72,7 +72,10 @@ class MessageViewHolder(itemView: View, adapter: MessagesConversationAdapter) :
}
messageBubble.setOutgoing(message.is_outgoing)
- text.setTextColor(ThemeUtils.getColorDependent(messageBubble.bubbleColor.defaultColor))
+ val bubbleColor = messageBubble.bubbleColor
+ if (bubbleColor != null) {
+ text.setTextColor(ThemeUtils.getColorDependent(bubbleColor.defaultColor))
+ }
// Loop through text and spans to found non-space char count
val hideText = run {
@@ -128,7 +131,11 @@ class MessageViewHolder(itemView: View, adapter: MessagesConversationAdapter) :
const val layoutResource = R.layout.list_item_message_conversation_text
fun MessageBubbleView.setOutgoing(outgoing: Boolean) {
- setCaretPosition(if (outgoing) MessageBubbleView.TOP_END else MessageBubbleView.BOTTOM_START)
+ caretPosition = if (outgoing) {
+ MessageBubbleView.TOP or MessageBubbleView.END
+ } else {
+ MessageBubbleView.BOTTOM or MessageBubbleView.START
+ }
}
}
}
diff --git a/twidere/src/main/res/layout/list_item_message_conversation_text.xml b/twidere/src/main/res/layout/list_item_message_conversation_text.xml
index eb1464502..cccf30aed 100644
--- a/twidere/src/main/res/layout/list_item_message_conversation_text.xml
+++ b/twidere/src/main/res/layout/list_item_message_conversation_text.xml
@@ -62,35 +62,41 @@
app:caretHeight="@dimen/element_spacing_normal"
app:caretPosition="bottomStart"
app:caretWidth="@dimen/element_spacing_normal"
- app:cornerRadius="2dp">
+ app:cornerRadius="2dp"
+ app:wrapContentMaxWidthPercent="85%p">
-
+ android:layout_marginLeft="@dimen/element_spacing_normal"
+ android:layout_marginRight="@dimen/element_spacing_normal"
+ android:layout_marginTop="@dimen/element_spacing_normal"
+ android:visibility="gone"
+ tools:visibility="visible">
-
+
-
+
-
-
-
+ android:layout_height="@dimen/element_spacing_normal"
+ android:layout_below="@+id/mediaPreview"/>
+
+
-