diff --git a/app/src/main/java/com/terratenientes/medicalhealth/EliminarActivity.kt b/app/src/main/java/com/terratenientes/medicalhealth/EliminarActivity.kt
index e8d58ef..e35e3ae 100644
--- a/app/src/main/java/com/terratenientes/medicalhealth/EliminarActivity.kt
+++ b/app/src/main/java/com/terratenientes/medicalhealth/EliminarActivity.kt
@@ -4,6 +4,7 @@ import adapters.DoctorDataBaseHelper
import adapters.PacienteAdapter
import data.Paciente
import android.annotation.SuppressLint
+import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
@@ -38,6 +39,12 @@ class EliminarActivity : AppCompatActivity() {
Toast.makeText(this, "Por favor, selecciona un paciente para eliminar.", Toast.LENGTH_SHORT).show()
}
}
+
+ binding.btnCancelar.setOnClickListener {
+ val intent = Intent(this@EliminarActivity, PrincipalActivity::class.java)
+ startActivity(intent)
+ finish()
+ }
}
private fun cargarListaPacientes() {
diff --git a/app/src/main/java/com/terratenientes/medicalhealth/EliminarRecetaActivity.kt b/app/src/main/java/com/terratenientes/medicalhealth/EliminarRecetaActivity.kt
index 90a746b..02738c2 100644
--- a/app/src/main/java/com/terratenientes/medicalhealth/EliminarRecetaActivity.kt
+++ b/app/src/main/java/com/terratenientes/medicalhealth/EliminarRecetaActivity.kt
@@ -2,6 +2,7 @@ package com.terratenientes.medicalhealth
import adapters.RecetaAdapter
import adapters.RecetaDataBaseHelper
+import android.content.Intent
import data.Receta
import android.os.Bundle
import android.widget.Toast
@@ -39,6 +40,13 @@ class EliminarRecetaActivity : AppCompatActivity() {
Toast.makeText(this, "Por favor, seleccione una receta para eliminar", Toast.LENGTH_SHORT).show()
}
}
+
+ binding.btnCancelarr.setOnClickListener {
+ val intent = Intent(this@EliminarRecetaActivity, PrincipalActivity::class.java)
+ startActivity(intent)
+ finish()
+ }
+
}
private fun cargarListaRecetas() {
diff --git a/app/src/main/res/layout/activity_eliminar_paciente.xml b/app/src/main/res/layout/activity_eliminar_paciente.xml
index 1b0ccb3..ffdd6e3 100644
--- a/app/src/main/res/layout/activity_eliminar_paciente.xml
+++ b/app/src/main/res/layout/activity_eliminar_paciente.xml
@@ -40,6 +40,7 @@
android:text="@string/bt_eliminar" />