Skip to content

Instantly share code, notes, and snippets.

@laurentyhuel
Last active March 21, 2022 11:10
Show Gist options
  • Save laurentyhuel/60b1ba29b49ff29fd0d55abd138e8419 to your computer and use it in GitHub Desktop.
Save laurentyhuel/60b1ba29b49ff29fd0d55abd138e8419 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