-2

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.

1 Answers1

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