daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top