Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Login extends FacebookFragment[LoginRequest]{
- override def draw() {
- super.draw()
- activity.title("Login")
- model = new LoginRequest()
- createBinder
- binder
- .property(id.login_email, model.username, model.username = _:String)
- .property(id.login_password, model.password, model.password = _:String)
- .action(id.login_entrar, login)
- updateView
- createAuthButton()
- }
- def login(){
- updateModel
- activity.login(model, activity.onLogin(success))
- }
- def success(response:AuthResponse){
- activity.loadUser()
- activity.changeFragment[ListEventFragment]
- }
- def viewLayout = layout.activity_login
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement