Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. class UserActivity : AppCompatActivity() {
  2.  
  3. //.....
  4. val presenter = UserPresenter()
  5.  
  6. override fun onCreate(savedInstanceState: Bundle?) {
  7. super.onCreate(savedInstanceState)
  8.  
  9. // Activity doesn't need to know how presenter works
  10. // for fetching data, it just know how to call the functions
  11. // So, if you add method inside presenter, it won't break the UI.
  12. // even the UI doesn't call the method.
  13.  
  14. presenter.getUserData()
  15. }
  16.  
  17. //....
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement