DBILITY

android glide image load 본문

android/java

android glide image load

DBILITY 2025. 1. 6. 10:26
반응형

libs.versions.toml

[versions]
glide = "4.16.0"
glidecompiler = "4.16.0"

[libraries]
glide = { group = "com.github.bumptech.glide", name = "glide", version.ref = "glide" }
glidecompiler = { group = "com.github.bumptech.glide", name = "compiler", version.ref = "glidecompiler" }

build.gradle

dependencies {

    implementation libs.glide        
    annotationProcessor libs.glidecompiler    
}

GlideModule.java

import com.bumptech.glide.module.AppGlideModule;

@com.bumptech.glide.annotation.GlideModule
public class GlideModule extends AppGlideModule {
    public GlideModule() {
        super();
    }
}

Activity.java

Glide.with(this).load(uri).diskCacheStrategy(DiskCacheStrategy.ALL).
      timeout(10000).into(popupLayoutBinding.imageView);

 

반응형

'android > java' 카테고리의 다른 글

java 난수 생성  (0) 2024.12.10
android ViewPager2  (0) 2024.11.19
android java ScrollView scroll  (0) 2024.11.18
android java interface lambda vs anonymous reference 'this' meaning  (0) 2024.11.14
java @SuppressWarnings  (0) 2024.05.23
Comments