@@ -0,0 +1,2620 @@
+package net.squanchy.imageloader;%0A%0Aimport android.content.Context;%0Aimport android.net.Uri;%0Aimport android.widget.ImageView;%0A%0Aimport com.bumptech.glide.DrawableTypeRequest;%0Aimport com.bumptech.glide.Glide;%0Aimport com.bumptech.glide.RequestManager;%0Aimport com.firebase.ui.storage.images.FirebaseImageLoader;%0Aimport com.google.firebase.storage.StorageReference;%0A%0Afinal class GlideImageLoader implements ImageLoader %7B%0A%0A    private static final String FIREBASE_STORAGE_URL_SCHEMA = %22gs://%22;%0A%0A    private final Context context;%0A%0A    GlideImageLoader(Context context) %7B%0A        this.context = context;%0A    %7D%0A%0A    @Override%0A    public ImageRequest load(String url) %7B%0A        if (url.startsWith(FIREBASE_STORAGE_URL_SCHEMA)) %7B%0A            throw new IllegalArgumentException(%22To load images from Firebase Storage please obtain the StorageReference first and use that one.%22);%0A        %7D%0A        return new GlideUrlImageRequest(context, url);%0A    %7D%0A%0A    @Override%0A    public ImageRequest load(StorageReference storageReference) %7B%0A        return new GlideFirebaseImageRequest(context, storageReference);%0A    %7D%0A%0A    private static final class GlideUrlImageRequest extends GlideImageRequest%3CUri%3E %7B%0A%0A        private final Uri uri;%0A%0A        GlideUrlImageRequest(Context context, String url) %7B%0A            super(context);%0A            this.uri = Uri.parse(url);%0A        %7D%0A%0A        public void into(ImageView imageView) %7B%0A            startLoading().into(imageView);%0A        %7D%0A%0A        @Override%0A        DrawableTypeRequest%3CUri%3E startLoading() %7B%0A            return glide().load(uri);%0A        %7D%0A    %7D%0A%0A    private static final class GlideFirebaseImageRequest extends GlideImageRequest%3CStorageReference%3E %7B%0A%0A        private final StorageReference storageReference;%0A%0A        GlideFirebaseImageRequest(Context context, StorageReference storageReference) %7B%0A            super(context);%0A            this.storageReference = storageReference;%0A        %7D%0A%0A        DrawableTypeRequest%3CStorageReference%3E startLoading() %7B%0A            return glide()%0A                    .using(new FirebaseImageLoader())%0A                    .load(storageReference);%0A        %7D%0A    %7D%0A%0A    private abstract static class GlideImageRequest%3CT%3E implements ImageRequest%3CT%3E %7B%0A%0A        private final Context context;%0A%0A        GlideImageRequest(Context context) %7B%0A            this.context = context;%0A        %7D%0A%0A        @Override%0A        public void into(ImageView imageView) %7B%0A            startLoading().into(imageView);%0A        %7D%0A%0A        abstract DrawableTypeRequest%3CT%3E startLoading();%0A%0A        final RequestManager glide() %7B%0A            return Glide.with(context);%0A        %7D%0A    %7D%0A%7D%0A

Create Glide ImageLoader implementation