public class ImageUtils {
@BindingAdapter(“loadCircle”)
public static void circle(ImageView iv, String path) {
RequestManager mRequestManager = Glide.with(new WeakReference<>(iv.getContext()).get());
mRequestManager
.load(path)
.placeholder(R.mipmap.icon_man)
.error(R.mipmap.icon_man)
.transform(new GlideCircleBorderTransform(1, Color.parseColor("#FE5DB3")))
.into((iv));
}
public static void circle1(ImageView iv, String path) {
RequestManager mRequestManager = Glide.with(new WeakReference<>(iv.getContext()).get());
mRequestManager
.load(path)
.placeholder(R.mipmap.icon_man)
.error(R.mipmap.icon_man)
.transform(new GlideCircleBorderTransform(1, Color.parseColor("#FE5DB3")))
.into((iv));
}
public static void circle2(ImageView iv, String path) {
Glide.with(iv.getContext())
.load(path)
.placeholder(R.mipmap.icon_man)
.error(R.mipmap.icon_man)
.transform(new GlideCircleBorderTransform(1, Color.parseColor("#FFF700")))
.into((iv));
}
public static void circle3(ImageView iv, String path) {
Glide.with(iv.getContext())
.load(path)
.into((iv));
}
public static void circle4(ImageView iv, String path) {
Glide.with(iv.getContext())
.load(path)
.placeholder(R.mipmap.icon_man)
.error(R.mipmap.icon_man)
.transform(new GlideCircleBorderTransform(1, Color.parseColor("#FF513C")))
.into((iv));
}
public static void circle5(ImageView iv, String path) {
Glide.with(iv.getContext())
.load(path)
.placeholder(R.mipmap.icon_man)
.error(R.mipmap.icon_man)
.transform(new GlideCircleBorderTransform(1, Color.parseColor("#FFC65D")))
.into((iv));
}
public static void circle6(ImageView iv, String path) {
Glide.with(iv.getContext())
.load(path)
.placeholder(R.mipmap.icon_man)
.error(R.mipmap.icon_man)
.transform(new GlideCircleBorderTransform(1, Color.parseColor("#B544E5")))
.into((iv));
}
public static void circle7(ImageView iv, String path) {
Glide.with