Skip to content

Instantly share code, notes, and snippets.

@laurentyhuel
Created May 9, 2022 08:20
Show Gist options
  • Save laurentyhuel/e5d1fc3534c1a554023cbb029a54cebb to your computer and use it in GitHub Desktop.
Save laurentyhuel/e5d1fc3534c1a554023cbb029a54cebb to your computer and use it in GitHub Desktop.
2xScreen : DefaultPresentation
class DefaultPresentation(
display: Display,
context: Context
) : Presentation(context, display) {
private lateinit var binding: PresentationDefaultBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
requestWindowFeature(Window.FEATURE_NO_TITLE)
binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.presentation_default, null, false)
setContentView(binding.root)
}
fun setImage(imageUri: Uri?) {
imageUri?.let {
binding.presentationImage.setImageURI(it)
} ?: run {
binding.presentationImage.setImageResource(R.drawable.logo_innovorder_inline)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment