glide
glide copied to clipboard
XML Rendering Issue when Extending ConstraintLayout and Using Glide for Image Loading
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)
}
}