Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. introducir el código aquí
  2.  
  3. private FirebaseAuth mAuth;
  4. private EditText mEtxtEmail,mEtxtPassword;
  5. private PresentadorLogin presentadorLogin;
  6.  
  7.  
  8. @Override
  9. protected void onCreate(Bundle savedInstanceState) {
  10. super.onCreate(savedInstanceState);
  11. Fabric.with(this, new Crashlytics());
  12.  
  13.  
  14. setContentView(R.layout.activity_main);
  15.  
  16. FirebaseAuth mAuth = FirebaseAuth.getInstance();
  17. DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();
  18. presentadorLogin = new PresentadorLogin(this,mAuth,mDatabase);
  19. mEtxtEmail = findViewById(R.id.etEmail);
  20. mEtxtPassword = findViewById(R.id.etPassword);
  21. Button mBtnLogin = findViewById(R.id.btnIngresar);
  22. mBtnLogin.setOnClickListener(this);
  23.  
  24.  
  25. }
  26.  
  27.  
  28. @Override
  29. public void onClick(View v) {
  30.  
  31. switch (v.getId()){
  32. case R.id.btnIngresar: String email = mEtxtEmail.getText().toString().trim();
  33. String pass = mEtxtPassword.getText().toString().trim();
  34. presentadorLogin.signInUser(email,pass);
  35. break;
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement