diff --git a/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt b/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt
index 6d709cc..ef65f3b 100644
--- a/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt
+++ b/app/src/main/java/com/terratenientes/medicalhealth/MainActivity.kt
@@ -29,16 +29,6 @@ class MainActivity : AppCompatActivity() {
Toast.makeText(this@MainActivity," NO VALIDADO",Toast.LENGTH_LONG).show()
}
}
-
- binding.btnPrueba.setOnClickListener {
- val intent = Intent(this@MainActivity, AgregarActivity::class.java)
- startActivity(intent)
- }
-
- binding.btnPrueba2.setOnClickListener {
- val intent = Intent(this@MainActivity, RecetaActivity::class.java)
- startActivity(intent)
- }
binding.tvRegistrarme.setOnClickListener{
val intent = Intent(this@MainActivity, RegistrarDActivity::class.java)
startActivity(intent)
diff --git a/app/src/main/java/com/terratenientes/medicalhealth/PrincipalActivity.kt b/app/src/main/java/com/terratenientes/medicalhealth/PrincipalActivity.kt
index 555e0b7..d325b95 100644
--- a/app/src/main/java/com/terratenientes/medicalhealth/PrincipalActivity.kt
+++ b/app/src/main/java/com/terratenientes/medicalhealth/PrincipalActivity.kt
@@ -1,11 +1,32 @@
package com.terratenientes.medicalhealth
+import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
+import com.terratenientes.medicalhealth.databinding.ActivityPrincipalBinding
class PrincipalActivity : AppCompatActivity() {
+ lateinit var binding : ActivityPrincipalBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_principal)
+ binding = ActivityPrincipalBinding.inflate(layoutInflater)
+ val view = binding.root
+ setContentView(view)
+
+ binding.btnAgregarPaciente.setOnClickListener {
+ val intent = Intent(this@PrincipalActivity, AgregarActivity::class.java)
+ startActivity(intent)
+ }
+
+ binding.btnEliminarPaciente.setOnClickListener {
+ val intent = Intent(this@PrincipalActivity, EliminarActivity::class.java)
+ startActivity(intent)
+ }
+
+ binding.btnAgregarReceta.setOnClickListener {
+ val intent = Intent(this@PrincipalActivity, RecetaActivity::class.java)
+ startActivity(intent)
+ }
+
}
}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 307f5a4..8006261 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -61,32 +61,6 @@
android:backgroundTint="@color/primaryColor"
/>
-
-
-
-
-
+ android:orientation="vertical"
+ tools:context="PrincipalActivity">
-
\ No newline at end of file
+
+
+
+
+
+
+
\ No newline at end of file