Skip to content

Instantly share code, notes, and snippets.

@ibrahim-mrq
Created November 24, 2022 12:20
Show Gist options
  • Select an option

  • Save ibrahim-mrq/8ada46467aa969bdbd067cd1f74abee8 to your computer and use it in GitHub Desktop.

Select an option

Save ibrahim-mrq/8ada46467aa969bdbd067cd1f74abee8 to your computer and use it in GitHub Desktop.
fun popupImage(context: Context, photo: Drawable) {
val popup = ImagePopup(context as Activity)
popup.initiatePopup(photo)
popup.isFullScreen = false
popup.isHideCloseIcon = false
popup.setBackgroundColor(Color.parseColor("#000000"))
popup.setOnImageClickListener {
popup.dismiss()
popup.isFullScreen = !popup.isFullScreen
popup.viewPopup()
}
popup.viewPopup()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment