Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ContactActivity : AppCompatActivity() {
- private val contactId by lazy {
- intent.extras["contact-id"]
- }
- private val view by lazy {
- ContactViewImpl(context = this)
- }
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(view)
- // handle redraw when view model updates, for example
- DI.contactViewModel.onUpdate = { viewState ->
- redraw(contactViewState = viewState)(view)
- }
- // bind views
- bind(DI.loadContactInteractor(contactId))(view)
- bind(DI.favContactInteractor(contactId))(view)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement