Alert now shows upon unsuccessful account deletion

This commit is contained in:
Aaron Sun 2020-11-24 16:38:47 -08:00
parent 9fa5f19b98
commit b842dcb46e
2 changed files with 29 additions and 0 deletions

View File

@ -67,6 +67,17 @@ public class ProfileFragment extends Fragment {
Log.i("Authentication", e.toString());
}
}
else {
View errorView = getLayoutInflater().inflate(R.layout.activity_erroralert, null);
AlertDialog.Builder builder2 = new AlertDialog.Builder(getActivity());
builder2.setView(errorView);
builder2.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {}
});
AlertDialog dialog2 = builder2.create();
dialog2.show();
}
}
});
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Incorrect password. Try again."
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>