Java Code Examples for com.bumptech.glide.Glide#register()
The following examples show how to use
com.bumptech.glide.Glide#register() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GlideModule.java From glide-support with The Unlicense | 5 votes |
@Override public void registerComponents(Context context, Glide glide) { // just to see the headers actually went through, Stetho or proxy can also be used for this glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(new OkHttpClient.Builder() .addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.HEADERS)) .build())); // override default loader with one that attaches headers glide.register(String.class, InputStream.class, new HeaderedLoader.Factory()); }
Example 2
Source File: CustomImageSizeGlideModule.java From Android-Tech with Apache License 2.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(CustomImageSizeModel.class, InputStream.class, new CustomImageSizeModelFactory()); }
Example 3
Source File: DrawableGlideMode.java From materialize with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(AppInfo.class, InputStream.class, new DrawableStreamLoader.Factory()); }
Example 4
Source File: UnsafeOkHttpGlideModule.java From android-tutorials-glide with MIT License | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory()); }
Example 5
Source File: VideoListGlideModule.java From VideoListPlayer with MIT License | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(sClient)); }
Example 6
Source File: OkHttpGlideModule.java From AndroidBase with Apache License 2.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory()); }
Example 7
Source File: GlideConfiguration.java From GankGirl with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { // 配置使用OKHttp3来请求网络 glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(new OkHttpClient())); }
Example 8
Source File: OkHttpGlideModule.java From Studio with Apache License 2.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(App.from(context).getHttpClient())); }
Example 9
Source File: GlideConfiguration.java From Cirrus_depricated with GNU General Public License v2.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new SynoxHttpUrlLoader.Factory()); }
Example 10
Source File: VideoThumbnailModule.java From ChatMessagesAdapter-android with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(VideoThumbnail.class, InputStream.class, new VideoThumbnailLoader.Factory()); }
Example 11
Source File: AVFileGlideModule.java From mr-mantou-android with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(AVFile.class, InputStream.class, new AVFileLoader.Factory()); }
Example 12
Source File: ExampleGlideModule.java From RecyclerAdapterBase with Apache License 2.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, ExampleApiBase.createUrlLoaderFactory()); }
Example 13
Source File: RetroMusicGlideModule.java From RetroMusicPlayer with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(AudioFileCover.class, InputStream.class, new AudioFileCoverLoader.Factory()); glide.register(ArtistImage.class, InputStream.class, new ArtistImageLoader.Factory(context)); }
Example 14
Source File: MyGlideModule.java From Simpler with Apache License 2.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { // glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory()); // 加载进度 glide.register(String.class, InputStream.class, new ProgressModelLoader.Factory()); }
Example 15
Source File: PhonographGlideModule.java From Orin with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(AudioFileCover.class, InputStream.class, new AudioFileCoverLoader.Factory()); glide.register(ArtistImage.class, InputStream.class, new ArtistImageLoader.Factory(context)); }
Example 16
Source File: PhonographGlideModule.java From Phonograph with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(AudioFileCover.class, InputStream.class, new AudioFileCoverLoader.Factory()); glide.register(ArtistImage.class, InputStream.class, new ArtistImageLoader.Factory()); }
Example 17
Source File: SilenceGlideModule.java From Silence with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(DecryptableUri.class, InputStream.class, new DecryptableStreamUriLoader.Factory()); glide.register(ContactPhotoUri.class, InputStream.class, new ContactPhotoUriLoader.Factory()); glide.register(AttachmentModel.class, InputStream.class, new AttachmentStreamUriLoader.Factory()); }
Example 18
Source File: GlideConfig.java From MVVM-JueJin with MIT License | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(OkHttpFactory.INSTANCE.create(null, false))); }
Example 19
Source File: MusicGlideModule.java From Music-Player with GNU General Public License v3.0 | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(AudioFileCover.class, InputStream.class, new AudioFileCoverLoader.Factory()); glide.register(ArtistImage.class, InputStream.class, new ArtistImageLoader.Factory()); }
Example 20
Source File: CustomImageSizeGlideModule.java From android-tutorials-glide with MIT License | 4 votes |
@Override public void registerComponents(Context context, Glide glide) { glide.register(CustomImageSizeModel.class, InputStream.class, new CustomImageSizeModelFactory()); }