Created
March 26, 2019 14:23
-
-
Save tfcporciuncula/b21c60f15810074e4dbb9621529f4194 to your computer and use it in GitHub Desktop.
TextPresenter.kt
This file contains hidden or 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 TextPresenter @AssistedInject constructor( | |
@Assisted private val view: TextView, | |
@Assisted @Text private val text: String, | |
private val textDecorator: TextDecorator | |
) { | |
@AssistedInject.Factory | |
interface Factory { | |
fun create(view: TextView, @Text text: String): TextPresenter | |
} | |
fun onCreate() { | |
view.showText(textDecorator.decorate(text)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment