Avance Actividad Modificar

This commit is contained in:
AngelSuarez03 2024-04-20 12:49:09 -06:00
parent c6fced65db
commit 40df86b20f
7 changed files with 124 additions and 0 deletions

View File

@ -33,6 +33,9 @@ android {
kotlinOptions { kotlinOptions {
jvmTarget = "1.8" jvmTarget = "1.8"
} }
viewBinding {
enable = true
}
} }
dependencies { dependencies {

View File

@ -12,6 +12,9 @@
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=".ModificarActivity"
android:exported="false" />
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"> android:exported="true">

View File

@ -0,0 +1,15 @@
package com.terratenientes.medicalhealth
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.terratenientes.medicalhealth.databinding.ActivityModificarBinding
class ModificarActivity : AppCompatActivity() {
lateinit var binding : ActivityModificarBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityModificarBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)
}
}

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M20,5A2,2 0,0 1,22 7V17A2,2 0,0 1,20 19H4C2.89,19 2,18.1 2,17V7C2,5.89 2.89,5 4,5H20M5,16H19L14.5,10L11,14.5L8.5,11.5L5,16Z"/>
</vector>

View File

@ -0,0 +1,84 @@
<?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=".ModificarActivity">
<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_modificar_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">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="65dp"
android:text="@string/et_modificar_edad"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="180dp"
android:text="@string/et_modificar_sexo"/>
</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:text="@string/bt_modificar"
android:layout_marginTop="70dp"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"/>
</LinearLayout>

View File

@ -2,4 +2,5 @@
<resources> <resources>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="tv_titulo">#FF303E9F</color>
</resources> </resources>

View File

@ -1,3 +1,12 @@
<resources> <resources>
<string name="app_name">MedicalHealth</string> <string name="app_name">MedicalHealth</string>
<!-- Modificar Activity -->
<string name="tv_modificar_titulo">Modificar Paciente</string>
<string name="et_modificar_edad">Edad:</string>
<string name="et_modificar_sexo">Sexo:</string>
<string name="ht_nombre">Nombre</string>
<string name="ht_apellido_paterno">Apellido Paterno</string>
<string name="ht_apellido_materno">Apellido Materno</string>
<string name="ht_domicilio">Domicilio</string>
<string name="bt_modificar">Modificar</string>
</resources> </resources>