diff --git a/4.Sistema/LOCCARR/app/src/main/java/br/com/flores/marcio/loccarr/MainActivity.java b/4.Sistema/LOCCARR/app/src/main/java/br/com/flores/marcio/loccarr/MainActivity.java index 98dcfa6..77eb561 100644 --- a/4.Sistema/LOCCARR/app/src/main/java/br/com/flores/marcio/loccarr/MainActivity.java +++ b/4.Sistema/LOCCARR/app/src/main/java/br/com/flores/marcio/loccarr/MainActivity.java @@ -18,7 +18,6 @@ public class MainActivity extends AppCompatActivity { EditText editMail, editSenha; String mail, senha; - ProgressDialog progressDialog; FirebaseAuth firebaseAuth; @Override @@ -28,8 +27,6 @@ protected void onCreate(Bundle savedInstanceState) { editMail = findViewById(R.id.editMail); editSenha = findViewById(R.id.editSenha); - - progressDialog = new ProgressDialog(this); } public void entrar(View view){ @@ -46,9 +43,6 @@ public void entrar(View view){ return; } - progressDialog.setMessage("Entrando..."); - progressDialog.show(); - firebaseAuth = FirebaseAuth.getInstance(); firebaseAuth.signInWithEmailAndPassword(mail, senha) @@ -56,12 +50,10 @@ public void entrar(View view){ @Override public void onComplete(@NonNull Task task) { if (task.isSuccessful()){ - progressDialog.dismiss(); finish(); startActivity(new Intent(getApplicationContext(), Dashboard.class)); } else { Toast.makeText(MainActivity.this, "Usuário/senha inválidos.", Toast.LENGTH_SHORT).show(); - progressDialog.dismiss(); } } });