I am trying to display a image popup in Kotlin and for that I am creating a dilog and set image from url using library fresco but I am getting error with syntax how should I do this below is my implementation. I want to set onclick event too how to do that.
Asked
Active
Viewed 376 times
-2
-
what is your error? Post the error logs – udi Mar 24 '21 at 11:39
1 Answers
1
Try this Because you are setting image before setting view and try with picaso and Glide its good for getting image with url
val view = inflater.inflate(R.layout.dialog_streak_homepopup, container, false)
val image = view.findViewById(R.id.streak_popup) as SimpleDraweeView
val uri: Uri = Uri.parse("https://raw.githubusercontent.com/facebook/fresco/master/docs/static/logo.png")
image.setImageURI(uri)
return View

beigirad
- 4,986
- 2
- 29
- 52

Amit pandey
- 1,149
- 1
- 4
- 15
-
-
please try this one : https://developer.android.com/training/app-links/deep-linking?authuser=1 – Amit pandey Mar 24 '21 at 11:59