Created
June 27, 2018 08:17
-
-
Save nikhilbansal97/3fa619412bc083e987759320c21d78ac to your computer and use it in GitHub Desktop.
The Presenter class for the SampleMVP Project
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
package com.example.nikhil.samplemvp.presenter | |
import com.example.nikhil.samplemvp.contract.ContractInterface.* | |
import com.example.nikhil.samplemvp.model.MainActivityModel | |
class MainActivityPresenter(_view: View): Presenter { | |
private var view: View = _view | |
private var model: Model = MainActivityModel() | |
init { | |
view.initView() | |
} | |
override fun incrementValue() { | |
model.incrementCounter() | |
view.updateViewData() | |
} | |
override fun getCounter() = model.getCounter().toString() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment