New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add the Placeholder for Imageview in Custom GlideModule #1078
Comments
Not sure if this is what you ask: Glide.with(...)
.load(stuff)
.placeholder(R.drawable.loading)
.error(R.drawable.failed)
.fallback(R.drawable.input_was_null)
.into(imageView); |
Reading it again: you cannot pass another Glide request to these methods, see #262 |
Thanks TWiStErRob , I'm getting error while implement the custom Glide module I have implement Glide module public class GbGlideModule implements GlideModule {
@Override
public void applyOptions(Context context, GlideBuilder builder) {
RequestOptions requestOptions =new RequestOptions();
requestOptions.placeholder(R.drawable.image_placeholder);
builder.setDefaultRequestOptions(requestOptions);
// todo
}
@Override
public void registerComponents(Context context, Registry registry) {
}
} In myAdapter class , Glide.with(activity).load(logo.getLogoPath()).into(h.all_Logo); Logcat :
Manifest : <meta-data
android:name="com.logo.utils.GbGlideModule"
android:value="GlideModule" /> Proguard : -keep public class * implements com.bumptech.glide.module.GlideModule
-keepnames class * com.logo.utils.GbGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
} |
Are you sure you got the fully qualified name of the module right? Other classes seem to be in I just noticed you use v4... so you want a central placeholder. |
Hi @TWiStErRob Thanks ... |
Do the centralized RequestOptions.placeholder work as you expected? |
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
Glide Version: 4.0.0-SNAPSHOT
Integration libraries: compile 'com.github.bumptech.glide:okhttp3-integration:2.0.0-SNAPSHOT'
Device/Android Version:Nexus5
Issue details / Repro steps / Use case background:
How to use the place holder image and error image for my Image view and how to set the image to imageview using DrawableRequestBuilder
The text was updated successfully, but these errors were encountered: