R
R
Ruslan2021-02-05 12:41:52
Android
Ruslan, 2021-02-05 12:41:52

How to download an image from a URL and make it a bitmap in kotlin?

var bitmap1: Bitmap? = null
var url = "https://i.ibb.co/F3k0101/hero-man.png"


How to throw a picture from Url inside the bitmap1 variable?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2021-02-05
@ruprup

Use Glide .

S
Stepan, 2021-02-06
@steff

I did it with Picasso. In Java, the code is simple:

Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView);

Read here: https://square.github.io/picasso/
About Picasso and Kotlin: https://stackoverflow.com/questions/55829753/picas...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question