bumptech / bumptech/glide

XML Rendering Issue when Extending ConstraintLayout and Using Glide for Image Loading

Open
#5,239 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

Android Studio Electric Eel | 2022.1.1 Patch2
gradle-7.2-bin.zip
glide:4.10.0

XML Rendering Issue when Extending ConstraintLayout and Using Glide for Image Loading
How to fix this problem?

class LoadingView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : ConstraintLayout(context, attrs) {

private val tvLoading: TextView
private val ivLoading: ImageView

init {
LayoutInflater.from(context).inflate(R.layout.layout_preview_loading_view,this)
tvLoading = findViewById(R.id.tvLoading)
ivLoading = findViewById(R.id.ivLoading)
initView()
}

private fun initView(){
Glide.with(ivLoading)
.load(R.drawable.icon_perview_loading)
.into(ivLoading)
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.