Last active
February 2, 2019 20:04
-
-
Save gilgoldzweig/c48a1dc1c8b6016e3e859f8d47eb675d to your computer and use it in GitHub Desktop.
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 ExampleActivity : AppCompatActivity(), ExampleContract.View { | |
lateinit var presenter: ExampleContract.Presenter | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
//Inject the presenter using Dependecy injection | |
presenter.fetchProfileName() | |
} | |
override fun onProfileNameReceived(name: String) { | |
//We recived the profile's name. Update ui | |
} | |
override fun onProfileNameRequestFailed(exception: Exception) { | |
//We did not recived the profile's name. Update ui | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment