Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.67 KB | None | 0 0
  1. class Login extends FacebookFragment[LoginRequest]{
  2.  
  3.   override def draw() {
  4.     super.draw()
  5.     activity.title("Login")
  6.     model = new LoginRequest()
  7.     createBinder
  8.     binder
  9.     .property(id.login_email, model.username, model.username = _:String)
  10.       .property(id.login_password, model.password, model.password = _:String)
  11.       .action(id.login_entrar, login)
  12.     updateView
  13.    createAuthButton()
  14.   }
  15.  
  16.   def login(){
  17.     updateModel
  18.     activity.login(model, activity.onLogin(success))
  19.   }
  20.  
  21.   def success(response:AuthResponse){
  22.     activity.loadUser()
  23.     activity.changeFragment[ListEventFragment]
  24.   }
  25.  
  26.   def viewLayout = layout.activity_login
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement