[M2] 默认图片更改, glide 加载图片设置
This commit is contained in:
@@ -32,9 +32,10 @@ class AdvanceImageView @JvmOverloads constructor(
|
||||
@SuppressLint("CheckResult")
|
||||
fun setImagePath(path: String){
|
||||
imageView?.setImageResource(R.drawable.m2_p_video_holder)
|
||||
imageView?.let { Glide.with(context).load(path)
|
||||
imageView?.let { Glide.with(context).asBitmap().load(path)
|
||||
.apply(
|
||||
RequestOptions().placeholder(R.drawable.m2_p_video_holder)
|
||||
RequestOptions().useUnlimitedSourceGeneratorsPool(true)
|
||||
.placeholder(R.drawable.m2_p_video_holder)
|
||||
.error(R.drawable.m2_p_video_holder)
|
||||
.fallback(R.drawable.m2_p_video_holder)
|
||||
.centerCrop()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 83 KiB |
@@ -471,9 +471,10 @@ class AdvanceImageView @JvmOverloads constructor(
|
||||
fun setImagePath(path: String) {
|
||||
imageView?.setImageResource(R.drawable.video_holder)
|
||||
imageView?.let {
|
||||
Glide.with(context).load(path)
|
||||
Glide.with(context).asBitmap().load(path)
|
||||
.apply(
|
||||
RequestOptions().placeholder(R.drawable.video_holder)
|
||||
RequestOptions().useUnlimitedSourceGeneratorsPool(true)
|
||||
.placeholder(R.drawable.video_holder)
|
||||
.error(R.drawable.video_holder)
|
||||
.fallback(R.drawable.video_holder)
|
||||
.centerCrop()
|
||||
|
||||
Reference in New Issue
Block a user