hi,
how i can load Profile icon from url
i see this code in Library Github(
https://github.com/mikepenz/MaterialDrawer)
Load images via url
The MaterialDrawer supports fetching images from URLs and setting them for the Profile icons. As the MaterialDrawer does not contain an ImageLoading library the dev can choose his own implementation (Picasso, Glide, ...). This has to be done, before the first image should be loaded via URL. (Should be done in the Application, but any other spot before loading the first image is working too)
Code:
//initialize and create the image loader logic
DrawerImageLoader.init(new AbstractDrawerImageLoader() {
@override
public void set(ImageView imageView, Uri uri, Drawable placeholder) {
Picasso.with(imageView.getContext()).load(uri).placeholder(placeholder).into(imageView);
}
@override
public void cancel(ImageView imageView) {
Picasso.with(imageView.getContext()).cancelRequest(imageView);
}
/*
@override
public Drawable placeholder(Context ctx) {
return super.placeholder(ctx);
}
@override
public Drawable placeholder(Context ctx, String tag) {
return super.placeholder(ctx, tag);
}
*/
});
please and please add this future to library
it's very useful
thanks a lot