Commit 6e7b563b by 刘鹏

feat : 解决ydl-image组件glide版本冲突导致崩溃问题

parent 1fc307bd
......@@ -6,17 +6,17 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.09",
"m-consultant" : "0.0.59.90",
"m-consultant" : "0.0.59.91",
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.38",
"m-home" : "0.0.22.68",
"m-im" : "0.0.19.69",
"m-user" : "0.0.61.39",
"m-home" : "0.0.22.69",
"m-im" : "0.0.19.70",
"m-dynamic" : "0.0.7.26",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.24",
"m-tests" : "0.0.24.14",
"m-course" : "0.0.42.62",
"m-course" : "0.0.42.63",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
......@@ -33,11 +33,11 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.40.15",
"ydl-platform" : "0.0.40.19",
//第二步 若干
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.9",
"ydl-media" : "0.0.21.10",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.26",
......@@ -89,17 +89,17 @@ ext {
//第三步 若干
"m-confide" : "0.0.49.09",
"m-consultant" : "0.0.59.90",
"m-consultant" : "0.0.59.91",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.38",
"m-home" : "0.0.22.68",
"m-im" : "0.0.19.69",
"m-user" : "0.0.61.39",
"m-home" : "0.0.22.69",
"m-im" : "0.0.19.70",
"m-dynamic" : "0.0.7.26",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.24",
"m-tests" : "0.0.24.14",
"m-course" : "0.0.42.62",
"m-course" : "0.0.42.63",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.11",
......@@ -115,11 +115,11 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.40.15",
"ydl-platform" : "0.0.40.19",
//第二步 若干
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.9",
"ydl-media" : "0.0.21.10",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.26",
......@@ -249,7 +249,7 @@ ext {
"aspectjrt" : "org.aspectj:aspectjrt:1.8.9",
"bugly-crashreport" : "com.tencent.bugly:crashreport:2.8.6.0",
"bugly-nativecrashreport" : "com.tencent.bugly:nativecrashreport:3.6.0.1",
"ydl-image" : "com.ydl:ydl-image:1.0.7-SNAPSHOT@aar",
"ydl-image" : "com.ydl:ydl-image:1.0.10-SNAPSHOT@aar",
"ydl-pushagent" : "com.ydl:pushagent:0.1.1",
"ydl-notracepoint" : "com.ydl:notracepoint-lib:0.2.3.3@aar",
"ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
......
......@@ -48,7 +48,7 @@ class BigShotOneView : LinearLayout {
}
fun setUrl(bean: ExpertSearchBigShotBean) {
GlideApp.with(mContext).load(bean.topicImages[0].imageUrl).into(consultant_one_img_1)
mContext?.let { GlideApp.with(it).load(bean.topicImages[0].imageUrl).into(consultant_one_img_1) }
consultant_one_img_1.setOnClickListener {
val h5Params = H5Params(bean.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
......
......@@ -52,17 +52,17 @@ class BigShotThreeView : LinearLayout {
bean2: ExpertSearchBigShotBean,
bean3: ExpertSearchBigShotBean
) {
GlideApp.with(mContext).load(bean1.topicImages[2].imageUrl).into(consultant_three_img_1)
mContext?.let { GlideApp.with(it).load(bean1.topicImages[2].imageUrl).into(consultant_three_img_1) }
consultant_three_img_1.setOnClickListener {
val h5Params = H5Params(bean1.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
}
GlideApp.with(mContext).load(bean2.topicImages[2].imageUrl).into(consultant_three_img_2)
mContext?.let { GlideApp.with(it).load(bean2.topicImages[2].imageUrl).into(consultant_three_img_2) }
consultant_three_img_2.setOnClickListener {
val h5Params = H5Params(bean2.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
}
GlideApp.with(mContext).load(bean3.topicImages[2].imageUrl).into(consultant_three_img_3)
mContext?.let { GlideApp.with(it).load(bean3.topicImages[2].imageUrl).into(consultant_three_img_3) }
consultant_three_img_3.setOnClickListener {
val h5Params = H5Params(bean3.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
......
......@@ -48,12 +48,12 @@ class BigShotTwoView : LinearLayout {
}
fun setUrl(bean1: ExpertSearchBigShotBean, bean2: ExpertSearchBigShotBean) {
GlideApp.with(mContext).load(bean1.topicImages[1].imageUrl).into(consultant_two_img_1)
mContext?.let { GlideApp.with(it).load(bean1.topicImages[1].imageUrl).into(consultant_two_img_1) }
consultant_two_img_1.setOnClickListener {
val h5Params = H5Params(bean1.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
}
GlideApp.with(mContext).load(bean2.topicImages[1].imageUrl).into(consultant_two_img_2)
mContext?.let { GlideApp.with(it).load(bean2.topicImages[1].imageUrl).into(consultant_two_img_2) }
consultant_two_img_2.setOnClickListener {
val h5Params = H5Params(bean2.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
......
......@@ -60,7 +60,7 @@ class RecommendItemView : LinearLayout {
fun setData(bean: ExpertSearchRecommandBean) {
if (bean.topicImages.isNotEmpty() && bean.topicImages.size > 0 && bean.topicImages[0].imageUrl.isNotEmpty()) {
GlideApp.with(mContext).load(bean.topicImages[0].imageUrl).into(top_item_img)
mContext?.let { GlideApp.with(it).load(bean.topicImages[0].imageUrl).into(top_item_img) }
}
top_item_title.text = bean.specialTopicTitle?:""
......
......@@ -125,7 +125,7 @@ class CourseTopicActivity : BaseActivity(), View.OnClickListener, SwipeRefreshLa
opicCourseBean = resp
course_topic_rcv.visibility = View.VISIBLE
adapter?.setDatas(resp.courses)
GlideApp.with(CourseTopicActivity@ this).load(resp.pic).into(headView)
headView?.let { GlideApp.with(CourseTopicActivity@ this).load(resp.pic).into(it) }
if (resp.explain.isNullOrEmpty()) {
footerView?.findViewById<LinearLayout>(R.id.ll_title)!!.visibility = View.GONE
} else {
......
......@@ -123,7 +123,7 @@ class HPlayView : RelativeLayout, OnPlayerEventListener {
fun setImageBackground(url: String?) {
if (!isDestroy()){
Glide.with(mContext).load(url).into(img_bg)
mContext?.let { Glide.with(it).load(url).into(img_bg) }
}
}
......@@ -265,9 +265,9 @@ class HPlayView : RelativeLayout, OnPlayerEventListener {
//判断当前页面是否销毁
if (!isDestroy()) {
if(isGif){
Glide.with(mContext).asGif().load(resourceId).into(imageView)
mContext?.let { Glide.with(it).asGif().load(resourceId).into(imageView) }
}else {
Glide.with(mContext).asBitmap().load(resourceId).into(imageView)
mContext?.let { Glide.with(it).asBitmap().load(resourceId).into(imageView) }
}
}
}
......
......@@ -287,7 +287,9 @@ class YdlHomeAdapter(private val mContext: Context,
init {
imageLogoView=footerView.findViewById(R.id.iv_logo_view);
GlideApp.with(mContext).load("https://static.yidianling.com/banner/bottombanner@2x.png").into(imageLogoView);
imageLogoView?.let {
GlideApp.with(mContext).load("https://static.yidianling.com/banner/bottombanner@2x.png").into(it);
}
}
}
}
\ No newline at end of file
......@@ -116,6 +116,12 @@
android:exported="false"
android:process=":core" />
<!-- 云信内部使用的进程间通信provider -->
<!-- SDK启动时会强制检测该组件的声明是否配置正确,如果检测到该声明不正确,SDK会主动抛出异常引发崩溃 -->
<provider
android:name="com.netease.nimlib.ipc.cp.provider.PreferenceContentProvider"
android:authorities="${APPLICATIONID}.ipc.provider.preference"
android:exported="false" />
<!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== -->
<!-- ====================IM - AvChat==================== -->
......
......@@ -56,7 +56,9 @@ class FingerPrintCheckActivity : BaseActivity(), View.OnClickListener {
//设置头像
val head = UserHelper.getUserInfo()?.userInfo?.head
if (!TextUtils.isEmpty(head)) {
GlideApp.with(mContext).load(head).into(headImg)
headImg?.let {
GlideApp.with(mContext).load(head).into(it)
}
}
checkText?.setOnClickListener(this)
......
......@@ -116,7 +116,9 @@ class HandUnlockCheckActivity : BaseActivity(), android.view.View.OnClickListene
imgHead = findViewById<CircleImageView>(R.id.head_img)
var head = UserHelper.getUserInfo()?.userInfo?.head
if (!TextUtils.isEmpty(head)) {
GlideApp.with(mContext).load(head).into(imgHead)
imgHead?.let {
GlideApp.with(mContext).load(head).into(it)
}
}
//忘记手势密码
textForget = findViewById<TextView>(R.id.text_forget)
......
......@@ -350,7 +350,7 @@ object CoverImageUtils {
fun loadThumb(url: String,onCoverLoadListener: OnCoverLoadListener) {
Glide.with(BaseApp.getApp()).asBitmap()
.load(url).into(object : SimpleTarget<Bitmap>() {
override fun onResourceReady(resource: Bitmap?, transition: Transition<in Bitmap>?) {
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
onCoverLoadListener.onComplete(resource!!)
}
})
......@@ -362,7 +362,7 @@ object CoverImageUtils {
RequestOptions.bitmapTransform(
CircleCrop()
)).load(url).into(object : SimpleTarget<Bitmap>() {
override fun onResourceReady(resource: Bitmap?, transition: Transition<in Bitmap>?) {
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
onCoverLoadListener.onComplete(resource!!)
}
})
......@@ -372,7 +372,7 @@ object CoverImageUtils {
val disallowHardwareConfig =
RequestOptions().format(DecodeFormat.PREFER_RGB_565).disallowHardwareConfig()
Glide.with(BaseApp.getApp()).asBitmap().apply(disallowHardwareConfig).load(url).into(object : SimpleTarget<Bitmap>() {
override fun onResourceReady(resource: Bitmap?, transition: Transition<in Bitmap>?) {
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
onCoverLoadListener.onComplete(CoverImageUtils.blur(resource)!!)
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment