Here is my attempted code.
val imageView = ImageView(holder.itemView.context)
holder.itemView.textView.setCompoundDrawablesWithIntrinsicBounds(
GlideApp.with(holder.itemView.context).load(URL).into(imageView), 0, 0, 0)
I am also not sure about Glide's image target. I have it set as .into(imageView)
. Since I want to add an image with TextView, there is no ImageView initialized to load the URL image into. My thought was to create one programmatically with
val imageView = ImageView(holder.itemView.context)
An error that I see is that GlideApp.with(holder.itemView.context).load(URL).into(imageView)
is not being detected as a drawable.