Pantallas Agregar y Eliminar Paciente

This commit is contained in:
mosterTeco 2024-04-20 14:01:50 -06:00
parent 40df86b20f
commit 91645d6da5
10 changed files with 197 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">

View File

@ -44,6 +44,7 @@ dependencies {
implementation("androidx.appcompat:appcompat:1.6.1") implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0") implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.activity:activity:1.8.0")
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

View File

@ -12,6 +12,12 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.MedicalHealth" android:theme="@style/Theme.MedicalHealth"
tools:targetApi="31"> tools:targetApi="31">
<activity
android:name=".EliminarActivity"
android:exported="false" />
<activity
android:name=".AgregarActivity"
android:exported="false" />
<activity <activity
android:name=".ModificarActivity" android:name=".ModificarActivity"
android:exported="false" /> android:exported="false" />

View File

@ -0,0 +1,15 @@
package com.terratenientes.medicalhealth
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class AgregarActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_agregar_paciente)
}
}

View File

@ -0,0 +1,15 @@
package com.terratenientes.medicalhealth
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class EliminarActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_eliminar_paciente)
}
}

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".AgregarActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textSize="32dp"
android:textStyle="bold"
android:textColor="@color/tv_titulo"
android:text="@string/tv_agregar_paciente_titulo"
android:gravity="center"
/>
<ImageView
android:layout_width="200dp"
android:layout_height="150dp"
android:layout_marginTop="25dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/image_area"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:orientation="horizontal"
tools:ignore="ExtraText">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="65dp"
android:text="@string/et_modificar_edad"/>
<EditText
android:layout_width="51dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="30dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:text="@string/et_modificar_sexo" />
<Spinner
android:layout_width="109dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="50dp" />
</LinearLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:hint="@string/ht_nombre"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:hint="@string/ht_apellido_paterno"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:hint="@string/ht_apellido_materno"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:hint="@string/ht_domicilio"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="50dp"
android:text="@string/bt_agregar" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bt_cancelar"
android:layout_marginTop="5dp"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"/>
</LinearLayout>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".EliminarActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textSize="32dp"
android:textStyle="bold"
android:textColor="@color/tv_titulo"
android:text="@string/eliminar_paciente_titulo"
android:gravity="center"
/>
<ListView
android:layout_width="match_parent"
android:layout_height="195dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="5dp" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="50dp"
android:text="@string/bt_eliminar" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bt_cancelar"
android:layout_marginTop="5dp"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"/>
</LinearLayout>

View File

@ -36,6 +36,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="65dp" android:layout_marginStart="65dp"
android:text="@string/et_modificar_edad"/> android:text="@string/et_modificar_edad"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -9,4 +9,9 @@
<string name="ht_apellido_materno">Apellido Materno</string> <string name="ht_apellido_materno">Apellido Materno</string>
<string name="ht_domicilio">Domicilio</string> <string name="ht_domicilio">Domicilio</string>
<string name="bt_modificar">Modificar</string> <string name="bt_modificar">Modificar</string>
<string name="tv_agregar_paciente_titulo">Agrega un paciente</string>
<string name="bt_agregar">Confirmar</string>
<string name="bt_cancelar">Cancelar</string>
<string name="eliminar_paciente_titulo">Elimina a un paciente</string>
<string name="bt_eliminar">Confirmar</string>
</resources> </resources>