|
@@ -1,10 +1,14 @@
|
|
package com.swago.home
|
|
package com.swago.home
|
|
|
|
|
|
|
|
+import android.graphics.BitmapFactory
|
|
|
|
+import android.graphics.NinePatch
|
|
|
|
+import android.graphics.drawable.BitmapDrawable
|
|
|
|
+import android.graphics.drawable.Drawable
|
|
|
|
+import android.graphics.drawable.NinePatchDrawable
|
|
import android.os.Bundle
|
|
import android.os.Bundle
|
|
import android.view.View
|
|
import android.view.View
|
|
import androidx.activity.viewModels
|
|
import androidx.activity.viewModels
|
|
import androidx.core.content.ContextCompat
|
|
import androidx.core.content.ContextCompat
|
|
-import androidx.fragment.app.viewModels
|
|
|
|
import com.alibaba.android.arouter.facade.annotation.Autowired
|
|
import com.alibaba.android.arouter.facade.annotation.Autowired
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
import com.alibaba.android.arouter.launcher.ARouter
|
|
import com.alibaba.android.arouter.launcher.ARouter
|
|
@@ -12,9 +16,12 @@ import com.google.gson.Gson
|
|
import com.gyf.immersionbar.ImmersionBar
|
|
import com.gyf.immersionbar.ImmersionBar
|
|
import com.swago.baseswago.PersonDataDFragment
|
|
import com.swago.baseswago.PersonDataDFragment
|
|
import com.swago.baseswago.UserVm
|
|
import com.swago.baseswago.UserVm
|
|
-import com.swago.baseswago.dialog.ReportBlockDialogFragment
|
|
|
|
import com.swago.baseswago.activity.BaseXActivity
|
|
import com.swago.baseswago.activity.BaseXActivity
|
|
import com.swago.baseswago.constant.ARouteConstant
|
|
import com.swago.baseswago.constant.ARouteConstant
|
|
|
|
+import com.swago.baseswago.dialog.ReportBlockDialogFragment
|
|
|
|
+import com.swago.baseswago.util.AppContext
|
|
|
|
+import com.swago.baseswago.util.DianJiuUtil
|
|
|
|
+import com.swago.baseswago.util.NinePatchChunk
|
|
import com.swago.baseswago.util.NoDoubleClickListener
|
|
import com.swago.baseswago.util.NoDoubleClickListener
|
|
import com.swago.baseswago.util.SpUtil
|
|
import com.swago.baseswago.util.SpUtil
|
|
import com.swago.baseswago.util.UserInfo
|
|
import com.swago.baseswago.util.UserInfo
|
|
@@ -23,7 +30,8 @@ import com.tencent.imsdk.v2.V2TIMConversation
|
|
import com.tencent.qcloud.tim.uikit.modules.chat.base.ChatInfo
|
|
import com.tencent.qcloud.tim.uikit.modules.chat.base.ChatInfo
|
|
import com.tencent.qcloud.tim.uikit.modules.chat.layout.message.MessageLayout
|
|
import com.tencent.qcloud.tim.uikit.modules.chat.layout.message.MessageLayout
|
|
import com.tencent.qcloud.tim.uikit.modules.message.MessageInfo
|
|
import com.tencent.qcloud.tim.uikit.modules.message.MessageInfo
|
|
-import com.tencent.qcloud.tim.uikit.utils.ToastUtil
|
|
|
|
|
|
+import java.io.FileInputStream
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
*@date 2021/8/24 15:01
|
|
*@date 2021/8/24 15:01
|
|
@@ -111,6 +119,18 @@ class ChatDetailActivity : BaseXActivity<ActivityChatDetailBinding>() {
|
|
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+// val path = "${AppContext.getContext().getExternalFilesDir(null)!!.path}/swagoFile/mmexport1718256766828.png"
|
|
|
|
+// val bitmap = BitmapFactory.decodeStream(FileInputStream(path))
|
|
|
|
+// val chunk = bitmap.ninePatchChunk
|
|
|
|
+// if (NinePatch.isNinePatchChunk(chunk)){
|
|
|
|
+// val patchy = NinePatchDrawable(resources,bitmap,chunk,NinePatchChunk.deserialize(chunk)?.mPaddings,null)
|
|
|
|
+// messageRecyclerView.rightBubble = patchy
|
|
|
|
+// }
|
|
|
|
+// DianJiuUtil.loadDian9Tu(this ,"https://apple-1304432552.cos.ap-shanghai.myqcloud.com/android.png") {
|
|
|
|
+// messageRecyclerView.rightBubble = it
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
override fun initLiveData() {
|
|
override fun initLiveData() {
|