Skip to content

Instantly share code, notes, and snippets.

@laurentyhuel
Created May 9, 2022 08:21
Show Gist options
  • Save laurentyhuel/a502a3e24769ab8a219d6fddf1e44fa5 to your computer and use it in GitHub Desktop.
Save laurentyhuel/a502a3e24769ab8a219d6fddf1e44fa5 to your computer and use it in GitHub Desktop.
2x screen : show presentation
private var presentation: DefaultPresentation? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
[...]
getCustomerDisplay(this)?.let { display ->
presentation = DefaultPresentation(display, applicationContext)
presentation?.setImage(uri)
}
}
override fun onResume() {
presentation?.show()
super.onResume()
}
override fun onPause() {
presentation?.hide()
super.onPause()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment