Set a bitmap image in ImageView
I’m a beginner in Kotlin and Android Studio and I would like to request for help to resolve this question:
Download an image from the URL;
Create Adapter module to receive bitmap;
Show image through ImageView object
I managed to resolve the first item with this simpler method. The next step is to improve with some library, but it’s working.
private fun downloadImage(item: Item) = Thread {
val imageConnection = URL(imageItem.url).openConnection() as HttpURLConnection
try {
if...