version:1.7.5
fix: update:增加使用手册二级页面
This commit is contained in:
21
app/src/main/java/com/uiui/zyos/view/ImageViewAdapter.java
Normal file
21
app/src/main/java/com/uiui/zyos/view/ImageViewAdapter.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package com.uiui.zyos.view;
|
||||
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.databinding.BindingAdapter;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
public class ImageViewAdapter {
|
||||
|
||||
/**
|
||||
* 自定义设置图片属性 - 在匹配时自定义命名空间会被忽略
|
||||
*/
|
||||
@BindingAdapter({"imageUrl"})
|
||||
public static void loadImage(ImageView imageView, int id) {
|
||||
Glide.with(imageView.getContext())
|
||||
.load(id)
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user