List of usage examples for android.widget ImageView getContext
@ViewDebug.CapturedViewProperty public final Context getContext()
From source file:Main.java
@SuppressWarnings("deprecation") private static void setDrawableToImageViewBeforeLollipop(ImageView imageView, int drawableId) { imageView.setImageDrawable(imageView.getContext().getResources().getDrawable(drawableId)); }
From source file:com.barak.pix.GlideUtil.java
public static void loadImage(String url, ImageView imageView) { Context context = imageView.getContext(); ColorDrawable cd = new ColorDrawable(ContextCompat.getColor(context, R.color.blue_grey_500)); Glide.with(context).load(url).placeholder(cd).crossFade().centerCrop().into(imageView); }
From source file:com.barak.pix.GlideUtil.java
public static void loadProfileIcon(String url, ImageView imageView) { Context context = imageView.getContext(); Glide.with(context).load(url).placeholder(R.drawable.ic_person_outline_black_24dp).dontAnimate().fitCenter() .into(imageView);/* www.ja va 2 s.co m*/ }
From source file:com.hackaton.GlideUtil.java
public static void loadImage(String url, ImageView imageView) { Context context = imageView.getContext(); ColorDrawable cd = new ColorDrawable(ContextCompat.getColor(context, R.color.colorAccent)); Glide.with(context).load(url).placeholder(cd).crossFade().centerCrop().into(imageView); }
From source file:Rangoli.testapp.Utils.PicassoUtil.java
public static void loadProfileIcon(String url, ImageView imageView) { Context context = imageView.getContext(); Picasso.with(context).load(url).placeholder(R.drawable.common_full_open_on_phone).into(imageView); }
From source file:com.akalizakeza.apps.ishusho.activity.GlideUtil.java
public static void loadImage(String url, ImageView imageView) { Context context = imageView.getContext(); ColorDrawable cd = new ColorDrawable(ContextCompat.getColor(context, R.color.colorPrimaryDark)); Glide.with(context).load(url).placeholder(cd).crossFade().centerCrop().into(imageView); }
From source file:com.akalizakeza.apps.ishusho.activity.GlideUtil.java
public static void loadProfileIcon(String url, ImageView imageView) { Context context = imageView.getContext(); Glide.with(context).load(url).placeholder(R.drawable.ic_person_black_48dp).dontAnimate().fitCenter() .into(imageView);//w w w . jav a 2 s .c o m }
From source file:Rangoli.testapp.Utils.PicassoUtil.java
public static void loadImage(String url, ImageView imageView) { Context context = imageView.getContext(); ColorDrawable cd = new ColorDrawable(ContextCompat.getColor(context, R.color.colorAccent)); Picasso.with(context).load(url).placeholder(cd).centerCrop().resize(400, 400).into(imageView); }
From source file:ch.berta.fabio.popularmovies.utils.BindingUtils.java
@BindingAdapter({ "backdropUrl" }) public static void loadBackdrop(ImageView view, String backdropUrl) { Glide.with(view.getContext()).load(backdropUrl).into(view); }
From source file:ch.berta.fabio.popularmovies.utils.BindingUtils.java
@BindingAdapter({ "imageUrl", "fallback" }) public static void loadMovieImage(ImageView view, String imageUrl, Drawable fallback) { Glide.with(view.getContext()).load(imageUrl).error(fallback).crossFade().into(view); }