Created
May 9, 2022 08:20
-
-
Save laurentyhuel/e5d1fc3534c1a554023cbb029a54cebb to your computer and use it in GitHub Desktop.
2xScreen : DefaultPresentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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