Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UserActivity : AppCompatActivity() {
- //.....
- val presenter = UserPresenter()
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- // Activity doesn't need to know how presenter works
- // for fetching data, it just know how to call the functions
- // So, if you add method inside presenter, it won't break the UI.
- // even the UI doesn't call the method.
- presenter.getUserData()
- }
- //....
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement