|
@@ -2,6 +2,7 @@ package com.swago.room.adapter
|
|
|
|
|
|
import android.graphics.Bitmap
|
|
|
import android.graphics.Color
|
|
|
+import android.graphics.drawable.BitmapDrawable
|
|
|
import android.os.Build
|
|
|
import android.text.*
|
|
|
import android.text.method.LinkMovementMethod
|
|
@@ -51,6 +52,12 @@ class RoomChatAdapter :
|
|
|
private val badgeBitmap by lazy {
|
|
|
BitmapUtils.getBitmapFromPath(UserInfo.getUserInfo()?.badge_special)
|
|
|
}
|
|
|
+ private val bubbleChat by lazy {
|
|
|
+ BitmapDrawable(mContext.resources , BitmapUtils.getBitmapFromPath(UserInfo.getUserInfo()?.badge_special))
|
|
|
+ }
|
|
|
+ private val userid by lazy {
|
|
|
+ UserInfo.getUserInfo()?.id
|
|
|
+ }
|
|
|
|
|
|
companion object {
|
|
|
const val LEVEL_KEY = "level"
|
|
@@ -449,6 +456,9 @@ class RoomChatAdapter :
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ if (bubbleChat != null && item.getSenderId() == userid){
|
|
|
+ tvContent.background = bubbleChat
|
|
|
+ }
|
|
|
tvContent.movementMethod = LinkMovementMethod.getInstance()
|
|
|
tvContent.highlightColor = Color.TRANSPARENT
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|