quero agora marcar as consultas e medicamentos para os apcientes
This commit is contained in:
@@ -4,8 +4,9 @@ package com.example.medcuida.pro.databinding;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.ScrollView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -33,9 +34,6 @@ public final class ActivityEditarPerfilBinding implements ViewBinding {
|
||||
@NonNull
|
||||
public final TextInputEditText editEmail;
|
||||
|
||||
@NonNull
|
||||
public final AutoCompleteTextView editGender;
|
||||
|
||||
@NonNull
|
||||
public final TextInputEditText editHorarioFim;
|
||||
|
||||
@@ -54,23 +52,40 @@ public final class ActivityEditarPerfilBinding implements ViewBinding {
|
||||
@NonNull
|
||||
public final ShapeableImageView imgPerfilEdit;
|
||||
|
||||
@NonNull
|
||||
public final RadioButton rbFeminino;
|
||||
|
||||
@NonNull
|
||||
public final RadioButton rbMasculino;
|
||||
|
||||
@NonNull
|
||||
public final RadioButton rbOutro;
|
||||
|
||||
@NonNull
|
||||
public final RadioGroup rgGender;
|
||||
|
||||
private ActivityEditarPerfilBinding(@NonNull ScrollView rootView,
|
||||
@NonNull MaterialButton btnGuardarAlteracoes, @NonNull ImageButton btnVoltar,
|
||||
@NonNull TextInputEditText editEmail, @NonNull AutoCompleteTextView editGender,
|
||||
@NonNull TextInputEditText editHorarioFim, @NonNull TextInputEditText editHorarioInicio,
|
||||
@NonNull TextInputEditText editName, @NonNull TextInputEditText editSpecialty,
|
||||
@NonNull FloatingActionButton fabEditPhoto, @NonNull ShapeableImageView imgPerfilEdit) {
|
||||
@NonNull TextInputEditText editEmail, @NonNull TextInputEditText editHorarioFim,
|
||||
@NonNull TextInputEditText editHorarioInicio, @NonNull TextInputEditText editName,
|
||||
@NonNull TextInputEditText editSpecialty, @NonNull FloatingActionButton fabEditPhoto,
|
||||
@NonNull ShapeableImageView imgPerfilEdit, @NonNull RadioButton rbFeminino,
|
||||
@NonNull RadioButton rbMasculino, @NonNull RadioButton rbOutro,
|
||||
@NonNull RadioGroup rgGender) {
|
||||
this.rootView = rootView;
|
||||
this.btnGuardarAlteracoes = btnGuardarAlteracoes;
|
||||
this.btnVoltar = btnVoltar;
|
||||
this.editEmail = editEmail;
|
||||
this.editGender = editGender;
|
||||
this.editHorarioFim = editHorarioFim;
|
||||
this.editHorarioInicio = editHorarioInicio;
|
||||
this.editName = editName;
|
||||
this.editSpecialty = editSpecialty;
|
||||
this.fabEditPhoto = fabEditPhoto;
|
||||
this.imgPerfilEdit = imgPerfilEdit;
|
||||
this.rbFeminino = rbFeminino;
|
||||
this.rbMasculino = rbMasculino;
|
||||
this.rbOutro = rbOutro;
|
||||
this.rgGender = rgGender;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,12 +133,6 @@ public final class ActivityEditarPerfilBinding implements ViewBinding {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.edit_gender;
|
||||
AutoCompleteTextView editGender = ViewBindings.findChildViewById(rootView, id);
|
||||
if (editGender == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.edit_horario_fim;
|
||||
TextInputEditText editHorarioFim = ViewBindings.findChildViewById(rootView, id);
|
||||
if (editHorarioFim == null) {
|
||||
@@ -160,9 +169,33 @@ public final class ActivityEditarPerfilBinding implements ViewBinding {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.rb_feminino;
|
||||
RadioButton rbFeminino = ViewBindings.findChildViewById(rootView, id);
|
||||
if (rbFeminino == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.rb_masculino;
|
||||
RadioButton rbMasculino = ViewBindings.findChildViewById(rootView, id);
|
||||
if (rbMasculino == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.rb_outro;
|
||||
RadioButton rbOutro = ViewBindings.findChildViewById(rootView, id);
|
||||
if (rbOutro == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.rg_gender;
|
||||
RadioGroup rgGender = ViewBindings.findChildViewById(rootView, id);
|
||||
if (rgGender == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new ActivityEditarPerfilBinding((ScrollView) rootView, btnGuardarAlteracoes, btnVoltar,
|
||||
editEmail, editGender, editHorarioFim, editHorarioInicio, editName, editSpecialty,
|
||||
fabEditPhoto, imgPerfilEdit);
|
||||
editEmail, editHorarioFim, editHorarioInicio, editName, editSpecialty, fabEditPhoto,
|
||||
imgPerfilEdit, rbFeminino, rbMasculino, rbOutro, rgGender);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_detalhe_paciente" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_detalhe_paciente.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="androidx.constraintlayout.widget.ConstraintLayout"><Targets><Target tag="layout/activity_detalhe_paciente_0" view="androidx.constraintlayout.widget.ConstraintLayout"><Expressions/><location startLine="1" startOffset="0" endLine="195" endOffset="51"/></Target><Target id="@+id/btn_sair_detalhe" view="ImageButton"><Expressions/><location startLine="11" startOffset="4" endLine="22" endOffset="33"/></Target><Target id="@+id/tv_nome_paciente" view="TextView"><Expressions/><location startLine="62" startOffset="20" endLine="68" endOffset="58"/></Target><Target id="@+id/tv_idade_paciente" view="TextView"><Expressions/><location startLine="70" startOffset="20" endLine="76" endOffset="58"/></Target><Target id="@+id/tv_numero_utente" view="TextView"><Expressions/><location startLine="78" startOffset="20" endLine="84" endOffset="58"/></Target><Target id="@+id/tv_sexo_paciente" view="TextView"><Expressions/><location startLine="86" startOffset="20" endLine="92" endOffset="58"/></Target><Target id="@+id/tv_email_paciente" view="TextView"><Expressions/><location startLine="94" startOffset="20" endLine="99" endOffset="48"/></Target><Target id="@+id/tv_medicacao_paciente" view="TextView"><Expressions/><location startLine="130" startOffset="20" endLine="137" endOffset="55"/></Target><Target id="@+id/btn_adicionar_medicamento" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="167" startOffset="20" endLine="175" endOffset="72"/></Target><Target id="@+id/btn_agendar_consulta" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="177" startOffset="20" endLine="186" endOffset="72"/></Target></Targets></Layout>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_detalhe_paciente" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_detalhe_paciente.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="androidx.constraintlayout.widget.ConstraintLayout"><Targets><Target tag="layout/activity_detalhe_paciente_0" view="androidx.constraintlayout.widget.ConstraintLayout"><Expressions/><location startLine="1" startOffset="0" endLine="201" endOffset="51"/></Target><Target id="@+id/btn_sair_detalhe" view="ImageButton"><Expressions/><location startLine="11" startOffset="4" endLine="22" endOffset="33"/></Target><Target id="@+id/tv_nome_paciente" view="TextView"><Expressions/><location startLine="65" startOffset="20" endLine="71" endOffset="58"/></Target><Target id="@+id/tv_idade_paciente" view="TextView"><Expressions/><location startLine="73" startOffset="20" endLine="79" endOffset="58"/></Target><Target id="@+id/tv_numero_utente" view="TextView"><Expressions/><location startLine="81" startOffset="20" endLine="87" endOffset="58"/></Target><Target id="@+id/tv_sexo_paciente" view="TextView"><Expressions/><location startLine="89" startOffset="20" endLine="95" endOffset="58"/></Target><Target id="@+id/tv_email_paciente" view="TextView"><Expressions/><location startLine="97" startOffset="20" endLine="102" endOffset="48"/></Target><Target id="@+id/tv_medicacao_paciente" view="TextView"><Expressions/><location startLine="134" startOffset="20" endLine="141" endOffset="55"/></Target><Target id="@+id/btn_adicionar_medicamento" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="172" startOffset="20" endLine="181" endOffset="72"/></Target><Target id="@+id/btn_agendar_consulta" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="183" startOffset="20" endLine="192" endOffset="72"/></Target></Targets></Layout>
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_editar_perfil" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_editar_perfil.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.ScrollView"><Targets><Target tag="layout/activity_editar_perfil_0" view="ScrollView"><Expressions/><location startLine="1" startOffset="0" endLine="174" endOffset="12"/></Target><Target id="@+id/btn_voltar" view="ImageButton"><Expressions/><location startLine="14" startOffset="8" endLine="20" endOffset="42"/></Target><Target id="@+id/img_perfil_edit" view="com.google.android.material.imageview.ShapeableImageView"><Expressions/><location startLine="38" startOffset="12" endLine="45" endOffset="68"/></Target><Target id="@+id/fab_edit_photo" view="com.google.android.material.floatingactionbutton.FloatingActionButton"><Expressions/><location startLine="47" startOffset="12" endLine="57" endOffset="57"/></Target><Target id="@+id/edit_name" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="66" startOffset="12" endLine="73" endOffset="38"/></Target><Target id="@+id/edit_specialty" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="82" startOffset="12" endLine="89" endOffset="38"/></Target><Target id="@+id/edit_gender" view="AutoCompleteTextView"><Expressions/><location startLine="99" startOffset="12" endLine="103" endOffset="42"/></Target><Target id="@+id/edit_horario_inicio" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="119" startOffset="16" endLine="126" endOffset="46"/></Target><Target id="@+id/edit_horario_fim" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="136" startOffset="16" endLine="143" endOffset="46"/></Target><Target id="@+id/edit_email" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="153" startOffset="12" endLine="159" endOffset="54"/></Target><Target id="@+id/btn_guardar_alteracoes" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="162" startOffset="8" endLine="171" endOffset="45"/></Target></Targets></Layout>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_editar_perfil" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_editar_perfil.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.ScrollView"><Targets><Target tag="layout/activity_editar_perfil_0" view="ScrollView"><Expressions/><location startLine="1" startOffset="0" endLine="202" endOffset="12"/></Target><Target id="@+id/btn_voltar" view="ImageButton"><Expressions/><location startLine="16" startOffset="8" endLine="22" endOffset="42"/></Target><Target id="@+id/img_perfil_edit" view="com.google.android.material.imageview.ShapeableImageView"><Expressions/><location startLine="41" startOffset="12" endLine="48" endOffset="68"/></Target><Target id="@+id/fab_edit_photo" view="com.google.android.material.floatingactionbutton.FloatingActionButton"><Expressions/><location startLine="50" startOffset="12" endLine="60" endOffset="57"/></Target><Target id="@+id/edit_name" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="69" startOffset="12" endLine="76" endOffset="38"/></Target><Target id="@+id/edit_specialty" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="85" startOffset="12" endLine="92" endOffset="38"/></Target><Target id="@+id/rg_gender" view="RadioGroup"><Expressions/><location startLine="103" startOffset="8" endLine="132" endOffset="20"/></Target><Target id="@+id/rb_masculino" view="RadioButton"><Expressions/><location startLine="110" startOffset="12" endLine="116" endOffset="48"/></Target><Target id="@+id/rb_feminino" view="RadioButton"><Expressions/><location startLine="118" startOffset="12" endLine="124" endOffset="48"/></Target><Target id="@+id/rb_outro" view="RadioButton"><Expressions/><location startLine="126" startOffset="12" endLine="131" endOffset="37"/></Target><Target id="@+id/edit_horario_inicio" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="147" startOffset="16" endLine="154" endOffset="46"/></Target><Target id="@+id/edit_horario_fim" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="164" startOffset="16" endLine="171" endOffset="46"/></Target><Target id="@+id/edit_email" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="181" startOffset="12" endLine="187" endOffset="54"/></Target><Target id="@+id/btn_guardar_alteracoes" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="190" startOffset="8" endLine="199" endOffset="45"/></Target></Targets></Layout>
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_detalhe_paciente" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_detalhe_paciente.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="androidx.constraintlayout.widget.ConstraintLayout"><Targets><Target tag="layout/activity_detalhe_paciente_0" view="androidx.constraintlayout.widget.ConstraintLayout"><Expressions/><location startLine="1" startOffset="0" endLine="195" endOffset="51"/></Target><Target id="@+id/btn_sair_detalhe" view="ImageButton"><Expressions/><location startLine="11" startOffset="4" endLine="22" endOffset="33"/></Target><Target id="@+id/tv_nome_paciente" view="TextView"><Expressions/><location startLine="62" startOffset="20" endLine="68" endOffset="58"/></Target><Target id="@+id/tv_idade_paciente" view="TextView"><Expressions/><location startLine="70" startOffset="20" endLine="76" endOffset="58"/></Target><Target id="@+id/tv_numero_utente" view="TextView"><Expressions/><location startLine="78" startOffset="20" endLine="84" endOffset="58"/></Target><Target id="@+id/tv_sexo_paciente" view="TextView"><Expressions/><location startLine="86" startOffset="20" endLine="92" endOffset="58"/></Target><Target id="@+id/tv_email_paciente" view="TextView"><Expressions/><location startLine="94" startOffset="20" endLine="99" endOffset="48"/></Target><Target id="@+id/tv_medicacao_paciente" view="TextView"><Expressions/><location startLine="130" startOffset="20" endLine="137" endOffset="55"/></Target><Target id="@+id/btn_adicionar_medicamento" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="167" startOffset="20" endLine="175" endOffset="72"/></Target><Target id="@+id/btn_agendar_consulta" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="177" startOffset="20" endLine="186" endOffset="72"/></Target></Targets></Layout>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_detalhe_paciente" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_detalhe_paciente.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="androidx.constraintlayout.widget.ConstraintLayout"><Targets><Target tag="layout/activity_detalhe_paciente_0" view="androidx.constraintlayout.widget.ConstraintLayout"><Expressions/><location startLine="1" startOffset="0" endLine="201" endOffset="51"/></Target><Target id="@+id/btn_sair_detalhe" view="ImageButton"><Expressions/><location startLine="11" startOffset="4" endLine="22" endOffset="33"/></Target><Target id="@+id/tv_nome_paciente" view="TextView"><Expressions/><location startLine="65" startOffset="20" endLine="71" endOffset="58"/></Target><Target id="@+id/tv_idade_paciente" view="TextView"><Expressions/><location startLine="73" startOffset="20" endLine="79" endOffset="58"/></Target><Target id="@+id/tv_numero_utente" view="TextView"><Expressions/><location startLine="81" startOffset="20" endLine="87" endOffset="58"/></Target><Target id="@+id/tv_sexo_paciente" view="TextView"><Expressions/><location startLine="89" startOffset="20" endLine="95" endOffset="58"/></Target><Target id="@+id/tv_email_paciente" view="TextView"><Expressions/><location startLine="97" startOffset="20" endLine="102" endOffset="48"/></Target><Target id="@+id/tv_medicacao_paciente" view="TextView"><Expressions/><location startLine="134" startOffset="20" endLine="141" endOffset="55"/></Target><Target id="@+id/btn_adicionar_medicamento" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="172" startOffset="20" endLine="181" endOffset="72"/></Target><Target id="@+id/btn_agendar_consulta" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="183" startOffset="20" endLine="192" endOffset="72"/></Target></Targets></Layout>
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_editar_perfil" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_editar_perfil.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.ScrollView"><Targets><Target tag="layout/activity_editar_perfil_0" view="ScrollView"><Expressions/><location startLine="1" startOffset="0" endLine="174" endOffset="12"/></Target><Target id="@+id/btn_voltar" view="ImageButton"><Expressions/><location startLine="14" startOffset="8" endLine="20" endOffset="42"/></Target><Target id="@+id/img_perfil_edit" view="com.google.android.material.imageview.ShapeableImageView"><Expressions/><location startLine="38" startOffset="12" endLine="45" endOffset="68"/></Target><Target id="@+id/fab_edit_photo" view="com.google.android.material.floatingactionbutton.FloatingActionButton"><Expressions/><location startLine="47" startOffset="12" endLine="57" endOffset="57"/></Target><Target id="@+id/edit_name" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="66" startOffset="12" endLine="73" endOffset="38"/></Target><Target id="@+id/edit_specialty" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="82" startOffset="12" endLine="89" endOffset="38"/></Target><Target id="@+id/edit_gender" view="AutoCompleteTextView"><Expressions/><location startLine="99" startOffset="12" endLine="103" endOffset="42"/></Target><Target id="@+id/edit_horario_inicio" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="119" startOffset="16" endLine="126" endOffset="46"/></Target><Target id="@+id/edit_horario_fim" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="136" startOffset="16" endLine="143" endOffset="46"/></Target><Target id="@+id/edit_email" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="153" startOffset="12" endLine="159" endOffset="54"/></Target><Target id="@+id/btn_guardar_alteracoes" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="162" startOffset="8" endLine="171" endOffset="45"/></Target></Targets></Layout>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_editar_perfil" modulePackage="com.example.medcuida.pro" filePath="app/src/main/res/layout/activity_editar_perfil.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.ScrollView"><Targets><Target tag="layout/activity_editar_perfil_0" view="ScrollView"><Expressions/><location startLine="1" startOffset="0" endLine="202" endOffset="12"/></Target><Target id="@+id/btn_voltar" view="ImageButton"><Expressions/><location startLine="16" startOffset="8" endLine="22" endOffset="42"/></Target><Target id="@+id/img_perfil_edit" view="com.google.android.material.imageview.ShapeableImageView"><Expressions/><location startLine="41" startOffset="12" endLine="48" endOffset="68"/></Target><Target id="@+id/fab_edit_photo" view="com.google.android.material.floatingactionbutton.FloatingActionButton"><Expressions/><location startLine="50" startOffset="12" endLine="60" endOffset="57"/></Target><Target id="@+id/edit_name" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="69" startOffset="12" endLine="76" endOffset="38"/></Target><Target id="@+id/edit_specialty" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="85" startOffset="12" endLine="92" endOffset="38"/></Target><Target id="@+id/rg_gender" view="RadioGroup"><Expressions/><location startLine="103" startOffset="8" endLine="132" endOffset="20"/></Target><Target id="@+id/rb_masculino" view="RadioButton"><Expressions/><location startLine="110" startOffset="12" endLine="116" endOffset="48"/></Target><Target id="@+id/rb_feminino" view="RadioButton"><Expressions/><location startLine="118" startOffset="12" endLine="124" endOffset="48"/></Target><Target id="@+id/rb_outro" view="RadioButton"><Expressions/><location startLine="126" startOffset="12" endLine="131" endOffset="37"/></Target><Target id="@+id/edit_horario_inicio" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="147" startOffset="16" endLine="154" endOffset="46"/></Target><Target id="@+id/edit_horario_fim" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="164" startOffset="16" endLine="171" endOffset="46"/></Target><Target id="@+id/edit_email" view="com.google.android.material.textfield.TextInputEditText"><Expressions/><location startLine="181" startOffset="12" endLine="187" endOffset="54"/></Target><Target id="@+id/btn_guardar_alteracoes" view="com.google.android.material.button.MaterialButton"><Expressions/><location startLine="190" startOffset="8" endLine="199" endOffset="45"/></Target></Targets></Layout>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Thu Apr 30 10:35:19 WEST 2026
|
||||
#Tue May 05 16:07:36 WEST 2026
|
||||
com.example.medcuida.pro.app-main-56\:/drawable-v26/ic_launcher_final.xml=/Users/230405/StudioProjects/cuidamais_med/app/build/intermediates/merged_res/debug/mergeDebugResources/drawable-v26_ic_launcher_final.xml.flat
|
||||
com.example.medcuida.pro.app-main-56\:/drawable/bg_gradient_header.xml=/Users/230405/StudioProjects/cuidamais_med/app/build/intermediates/merged_res/debug/mergeDebugResources/drawable_bg_gradient_header.xml.flat
|
||||
com.example.medcuida.pro.app-main-56\:/drawable/btn_outline_error.xml=/Users/230405/StudioProjects/cuidamais_med/app/build/intermediates/merged_res/debug/mergeDebugResources/drawable_btn_outline_error.xml.flat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Thu Apr 30 10:35:19 WEST 2026
|
||||
#Tue May 05 16:07:36 WEST 2026
|
||||
com.example.medcuida.pro.app-main-6\:/drawable-v26/ic_launcher_final.xml=/Users/230405/Desktop/med Cuida+/app/build/intermediates/packaged_res/debug/packageDebugResources/drawable-v26/ic_launcher_final.xml
|
||||
com.example.medcuida.pro.app-main-6\:/drawable/bg_gradient_header.xml=/Users/230405/Desktop/med Cuida+/app/build/intermediates/packaged_res/debug/packageDebugResources/drawable/bg_gradient_header.xml
|
||||
com.example.medcuida.pro.app-main-6\:/drawable/btn_outline_error.xml=/Users/230405/Desktop/med Cuida+/app/build/intermediates/packaged_res/debug/packageDebugResources/drawable/btn_outline_error.xml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Thu Apr 30 10:38:47 WEST 2026
|
||||
#Tue May 05 16:07:37 WEST 2026
|
||||
base.0=/Users/230405/Desktop/med Cuida+/app/build/intermediates/dex/debug/mergeExtDexDebug/classes.dex
|
||||
base.1=/Users/230405/Desktop/med Cuida+/app/build/intermediates/dex/debug/mergeProjectDexDebug/0/classes.dex
|
||||
base.2=/Users/230405/Desktop/med Cuida+/app/build/intermediates/dex/debug/mergeProjectDexDebug/11/classes.dex
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -70,7 +70,6 @@ id chip_group_times
|
||||
id container
|
||||
id edit_consulta_motivo
|
||||
id edit_email
|
||||
id edit_gender
|
||||
id edit_horario_fim
|
||||
id edit_horario_inicio
|
||||
id edit_med_name
|
||||
@@ -105,8 +104,11 @@ id navigation_schedule_appointment
|
||||
id navigation_sns24
|
||||
id new_password
|
||||
id password_edit_text
|
||||
id rb_feminino
|
||||
id rb_inhalatory
|
||||
id rb_masculino
|
||||
id rb_oral
|
||||
id rb_outro
|
||||
id rb_topical
|
||||
id recycler_aceites
|
||||
id recycler_agenda
|
||||
@@ -117,6 +119,7 @@ id register_button
|
||||
id register_link
|
||||
id reset_button
|
||||
id rg_administration
|
||||
id rg_gender
|
||||
id search_layout_pacientes
|
||||
id specialty_edit_text
|
||||
id text_aceites_empty
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,4 @@
|
||||
[
|
||||
{
|
||||
"merged": "com.example.medcuida.pro.app-mergeDebugResources-54:/layout/item_comprimido_search.xml",
|
||||
"source": "com.example.medcuida.pro.app-main-57:/layout/item_comprimido_search.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-mergeDebugResources-54:/layout/dialog_add_medication.xml",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/dialog_add_medication.xml"
|
||||
@@ -23,6 +19,10 @@
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-mergeDebugResources-54:/layout/item_consulta_medico.xml",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/item_consulta_medico.xml"
|
||||
},
|
||||
{
|
||||
"merged": "com.example.medcuida.pro.app-mergeDebugResources-54:/layout/activity_main.xml",
|
||||
"source": "com.example.medcuida.pro.app-main-57:/layout/activity_main.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-mergeDebugResources-54:/layout/activity_register.xml",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/activity_register.xml"
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/drawable_ic_launcher.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/drawable/ic_launcher.xml"
|
||||
},
|
||||
{
|
||||
"merged": "com.example.medcuida.pro.app-debug-55:/layout_activity_main.xml.flat",
|
||||
"source": "com.example.medcuida.pro.app-main-57:/layout/activity_main.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/layout_activity_editar_perfil.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/activity_editar_perfil.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/drawable_bg_gradient_header.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/drawable/bg_gradient_header.xml"
|
||||
@@ -11,10 +19,6 @@
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/drawable_ic_nav_inicio.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/drawable/ic_nav_inicio.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/layout_activity_editar_perfil.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/activity_editar_perfil.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/layout_activity_main.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/activity_main.xml"
|
||||
@@ -91,10 +95,6 @@
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/layout_activity_forgot_password.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/layout/activity_forgot_password.xml"
|
||||
},
|
||||
{
|
||||
"merged": "com.example.medcuida.pro.app-debug-55:/layout_item_comprimido_search.xml.flat",
|
||||
"source": "com.example.medcuida.pro.app-main-57:/layout/item_comprimido_search.xml"
|
||||
},
|
||||
{
|
||||
"merged": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-debug-55:/xml_data_extraction_rules.xml.flat",
|
||||
"source": "/Users/230405/.gradle/daemon/9.4.1/com.example.medcuida.pro.app-main-57:/xml/data_extraction_rules.xml"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="80dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_sair_detalhe"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
@@ -56,7 +58,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Informação Pessoal"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textSize="22sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
@@ -124,7 +127,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Medicação Ativa"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textSize="22sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
@@ -161,7 +165,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ações Clínicas"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:textSize="22sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
@@ -170,9 +175,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:text="Adicionar Medicamento"
|
||||
app:cornerRadius="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cornerRadius="30dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:icon="@drawable/ic_plus"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
style="@style/Widget.MaterialComponents.Button"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@@ -180,10 +186,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:text="Marcar Consulta"
|
||||
app:cornerRadius="12dp"
|
||||
app:cornerRadius="30dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:icon="@drawable/ic_calendar"
|
||||
android:backgroundTint="#4CAF50"
|
||||
app:backgroundTint="#4CAF50"
|
||||
style="@style/Widget.MaterialComponents.Button"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="#FAFAFA">
|
||||
android:background="@color/background_color">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="40dp"
|
||||
android:paddingHorizontal="24dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_voltar"
|
||||
@@ -24,11 +26,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Editar Dados Pessoais"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
android:textAlignment="center"
|
||||
android:textSize="28sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="32dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -90,19 +93,44 @@
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sexo"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_gender"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="Sexo">
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/edit_gender"
|
||||
android:layout_width="match_parent"
|
||||
<RadioButton
|
||||
android:id="@+id/rb_masculino"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:text="Masculino"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_feminino"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:text="Feminino"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_outro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:text="Outro"/>
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -163,12 +191,12 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_guardar_alteracoes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_height="60dp"
|
||||
android:text="GUARDAR ALTERAÇÕES"
|
||||
android:textSize="14sp"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="28dp"
|
||||
app:backgroundTint="#000000"
|
||||
app:cornerRadius="30dp"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3426,7 +3426,6 @@ int id east 0x7f0900ce
|
||||
int id edge 0x7f0900cf
|
||||
int id edit_consulta_motivo 0x7f0900d0
|
||||
int id edit_email 0x7f0900d1
|
||||
int id edit_gender 0x7f0900d2
|
||||
int id edit_horario_fim 0x7f0900d3
|
||||
int id edit_horario_inicio 0x7f0900d4
|
||||
int id edit_med_name 0x7f0900d5
|
||||
@@ -3658,8 +3657,11 @@ int id progress_circular 0x7f0901b6
|
||||
int id progress_horizontal 0x7f0901b7
|
||||
int id radio 0x7f0901b8
|
||||
int id ratio 0x7f0901b9
|
||||
int id rb_feminino 0x7f090275
|
||||
int id rb_inhalatory 0x7f0901ba
|
||||
int id rb_masculino 0x7f090276
|
||||
int id rb_oral 0x7f0901bb
|
||||
int id rb_outro 0x7f090277
|
||||
int id rb_topical 0x7f0901bc
|
||||
int id rectangles 0x7f0901bd
|
||||
int id recycler_aceites 0x7f0901be
|
||||
@@ -3673,6 +3675,7 @@ int id report_drawn 0x7f0901c5
|
||||
int id reset_button 0x7f0901c6
|
||||
int id reverseSawtooth 0x7f0901c7
|
||||
int id rg_administration 0x7f0901c8
|
||||
int id rg_gender 0x7f090278
|
||||
int id right 0x7f0901c9
|
||||
int id rightToLeft 0x7f0901ca
|
||||
int id right_icon 0x7f0901cb
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3427,7 +3427,6 @@ id east
|
||||
id edge
|
||||
id edit_consulta_motivo
|
||||
id edit_email
|
||||
id edit_gender
|
||||
id edit_horario_fim
|
||||
id edit_horario_inicio
|
||||
id edit_med_name
|
||||
@@ -3659,8 +3658,11 @@ id progress_circular
|
||||
id progress_horizontal
|
||||
id radio
|
||||
id ratio
|
||||
id rb_feminino
|
||||
id rb_inhalatory
|
||||
id rb_masculino
|
||||
id rb_oral
|
||||
id rb_outro
|
||||
id rb_topical
|
||||
id rectangles
|
||||
id recycler_aceites
|
||||
@@ -3674,6 +3676,7 @@ id report_drawn
|
||||
id reset_button
|
||||
id reverseSawtooth
|
||||
id rg_administration
|
||||
id rg_gender
|
||||
id right
|
||||
id rightToLeft
|
||||
id right_icon
|
||||
|
||||
Binary file not shown.
@@ -182,8 +182,6 @@ public class DetalhePacienteActivity extends AppCompatActivity {
|
||||
}
|
||||
if (count > 0) {
|
||||
Log.d(TAG, "Carregados " + count + " de " + source);
|
||||
final int total = fullPillsList.size();
|
||||
runOnUiThread(() -> Toast.makeText(DetalhePacienteActivity.this, "Medicamentos carregados: " + total, Toast.LENGTH_SHORT).show());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,42 +309,70 @@ public class DetalhePacienteActivity extends AppCompatActivity {
|
||||
final String[] selectedTime = {""};
|
||||
final String selectedMedicoId = mAuth.getUid();
|
||||
|
||||
// Setup Date Picker
|
||||
btnDate.setOnClickListener(v -> {
|
||||
java.util.Calendar cal = java.util.Calendar.getInstance();
|
||||
new android.app.DatePickerDialog(this, (view, year, month, day) -> {
|
||||
selectedDate[0] = String.format(java.util.Locale.getDefault(), "%02d/%02d/%d", day, month + 1, year);
|
||||
btnDate.setText(selectedDate[0]);
|
||||
}, cal.get(java.util.Calendar.YEAR), cal.get(java.util.Calendar.MONTH), cal.get(java.util.Calendar.DAY_OF_MONTH)).show();
|
||||
});
|
||||
|
||||
// Setup Time Slots Grid
|
||||
String[] times = {"09:00", "09:20", "09:40", "10:00", "10:20", "10:40", "11:00", "11:20", "11:40", "12:00", "12:20", "12:40"};
|
||||
recyclerTimes.setLayoutManager(new androidx.recyclerview.widget.GridLayoutManager(this, 4));
|
||||
|
||||
java.util.List<String> dynamicTimes = new java.util.ArrayList<>();
|
||||
class TimeAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<TimeAdapter.VH> {
|
||||
int selectedPos = -1;
|
||||
@androidx.annotation.NonNull @Override public VH onCreateViewHolder(@androidx.annotation.NonNull android.view.ViewGroup p, int t) {
|
||||
return new VH(getLayoutInflater().inflate(R.layout.item_time_slot, p, false));
|
||||
}
|
||||
@Override public void onBindViewHolder(@androidx.annotation.NonNull VH h, int p) {
|
||||
h.tv.setText(times[p]);
|
||||
h.tv.setText(dynamicTimes.get(p));
|
||||
h.card.setStrokeColor(selectedPos == p ? android.graphics.Color.BLUE : android.graphics.Color.LTGRAY);
|
||||
h.card.setOnClickListener(v -> {
|
||||
int old = selectedPos;
|
||||
selectedPos = p;
|
||||
selectedTime[0] = times[p];
|
||||
selectedTime[0] = dynamicTimes.get(p);
|
||||
notifyItemChanged(old);
|
||||
notifyItemChanged(selectedPos);
|
||||
});
|
||||
}
|
||||
@Override public int getItemCount() { return times.length; }
|
||||
@Override public int getItemCount() { return dynamicTimes.size(); }
|
||||
class VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder {
|
||||
android.widget.TextView tv; com.google.android.material.card.MaterialCardView card;
|
||||
VH(android.view.View v) { super(v); tv = v.findViewById(R.id.tv_time_slot); card = v.findViewById(R.id.card_time_slot); }
|
||||
}
|
||||
public void resetSelection() { selectedPos = -1; selectedTime[0] = ""; notifyDataSetChanged(); }
|
||||
}
|
||||
recyclerTimes.setAdapter(new TimeAdapter());
|
||||
|
||||
recyclerTimes.setLayoutManager(new androidx.recyclerview.widget.GridLayoutManager(this, 4));
|
||||
TimeAdapter adapter = new TimeAdapter();
|
||||
recyclerTimes.setAdapter(adapter);
|
||||
|
||||
Runnable updateTimes = () -> {
|
||||
dynamicTimes.clear();
|
||||
java.util.Calendar now = java.util.Calendar.getInstance();
|
||||
boolean isToday = selectedDate[0].equals(String.format(java.util.Locale.getDefault(), "%02d/%02d/%d",
|
||||
now.get(java.util.Calendar.DAY_OF_MONTH), now.get(java.util.Calendar.MONTH) + 1, now.get(java.util.Calendar.YEAR)));
|
||||
int currentHour = now.get(java.util.Calendar.HOUR_OF_DAY);
|
||||
int currentMinute = now.get(java.util.Calendar.MINUTE);
|
||||
|
||||
for (int h = 8; h < 19; h++) {
|
||||
for (int m = 0; m < 60; m += 20) {
|
||||
if (!isToday || h > currentHour || (h == currentHour && m > currentMinute)) {
|
||||
dynamicTimes.add(String.format(java.util.Locale.getDefault(), "%02d:%02d", h, m));
|
||||
}
|
||||
}
|
||||
}
|
||||
adapter.resetSelection();
|
||||
};
|
||||
|
||||
// Set default date to today
|
||||
java.util.Calendar calNow = java.util.Calendar.getInstance();
|
||||
selectedDate[0] = String.format(java.util.Locale.getDefault(), "%02d/%02d/%d",
|
||||
calNow.get(java.util.Calendar.DAY_OF_MONTH), calNow.get(java.util.Calendar.MONTH) + 1, calNow.get(java.util.Calendar.YEAR));
|
||||
btnDate.setText(selectedDate[0]);
|
||||
updateTimes.run();
|
||||
|
||||
// Setup Date Picker
|
||||
btnDate.setOnClickListener(v -> {
|
||||
java.util.Calendar cal = java.util.Calendar.getInstance();
|
||||
// Optional: Parse selectedDate[0] to set initial date on picker, skipping for brevity
|
||||
new android.app.DatePickerDialog(this, (view, year, month, day) -> {
|
||||
selectedDate[0] = String.format(java.util.Locale.getDefault(), "%02d/%02d/%d", day, month + 1, year);
|
||||
btnDate.setText(selectedDate[0]);
|
||||
updateTimes.run();
|
||||
}, cal.get(java.util.Calendar.YEAR), cal.get(java.util.Calendar.MONTH), cal.get(java.util.Calendar.DAY_OF_MONTH)).show();
|
||||
});
|
||||
|
||||
dialogView.findViewById(R.id.btn_confirmar_agendamento).setOnClickListener(v -> {
|
||||
if (selectedDate[0].isEmpty() || selectedTime[0].isEmpty()) {
|
||||
@@ -355,12 +381,19 @@ public class DetalhePacienteActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
java.util.Map<String, Object> consulta = new java.util.HashMap<>();
|
||||
// Campos para a App do Médico (Med Cuida+)
|
||||
consulta.put("pacienteId", pacienteId);
|
||||
consulta.put("pacienteNome", nomePaciente);
|
||||
consulta.put("medicoId", selectedMedicoId);
|
||||
consulta.put("data", selectedDate[0]);
|
||||
consulta.put("hora", selectedTime[0]);
|
||||
consulta.put("status", "aceite");
|
||||
|
||||
// Campos partilhados ou para a App do Paciente (Cuida+)
|
||||
consulta.put("userId", pacienteId);
|
||||
consulta.put("date", selectedDate[0]);
|
||||
consulta.put("time", selectedTime[0]);
|
||||
consulta.put("isPast", false);
|
||||
consulta.put("status", "Aceite"); // A App paciente usa "Aceite" com A maiúsculo
|
||||
consulta.put("reason", editReason.getText().toString().trim());
|
||||
consulta.put("type", "Consulta de Rotina");
|
||||
|
||||
|
||||
@@ -3,30 +3,23 @@ package com.example.medcuida.pro;
|
||||
import android.app.TimePickerDialog;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.firestore.DocumentReference;
|
||||
import com.google.firebase.firestore.FirebaseFirestore;
|
||||
import com.google.firebase.firestore.SetOptions;
|
||||
import com.google.firebase.firestore.WriteBatch;
|
||||
import com.google.firebase.storage.FirebaseStorage;
|
||||
import com.google.firebase.storage.StorageReference;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
@@ -35,12 +28,10 @@ import java.util.Map;
|
||||
public class EditarPerfilActivity extends AppCompatActivity {
|
||||
|
||||
private TextInputEditText nameEditText, specialtyEditText, emailEditText, horarioInicioEditText, horarioFimEditText;
|
||||
private AutoCompleteTextView genderAutoComplete;
|
||||
private RadioGroup rgGender;
|
||||
private MaterialButton btnGuardar;
|
||||
private ImageButton btnVoltar;
|
||||
private ShapeableImageView imgPerfil;
|
||||
private FloatingActionButton fabEditPhoto;
|
||||
|
||||
private FirebaseAuth mAuth;
|
||||
private FirebaseFirestore db;
|
||||
private FirebaseStorage storage;
|
||||
@@ -65,234 +56,136 @@ public class EditarPerfilActivity extends AppCompatActivity {
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
db = FirebaseFirestore.getInstance();
|
||||
storage = FirebaseStorage.getInstance();
|
||||
|
||||
if (mAuth.getCurrentUser() == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (mAuth.getCurrentUser() == null) { finish(); return; }
|
||||
currentUserId = mAuth.getCurrentUser().getUid();
|
||||
|
||||
// Bind Views safely
|
||||
imgPerfil = findViewById(R.id.img_perfil_edit);
|
||||
fabEditPhoto = findViewById(R.id.fab_edit_photo);
|
||||
// Toolbar
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
}
|
||||
toolbar.setNavigationOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
// Bind views
|
||||
nameEditText = findViewById(R.id.edit_name);
|
||||
specialtyEditText = findViewById(R.id.edit_specialty);
|
||||
genderAutoComplete = findViewById(R.id.edit_gender);
|
||||
rgGender = findViewById(R.id.rg_gender);
|
||||
horarioInicioEditText = findViewById(R.id.edit_horario_inicio);
|
||||
horarioFimEditText = findViewById(R.id.edit_horario_fim);
|
||||
emailEditText = findViewById(R.id.edit_email);
|
||||
btnGuardar = findViewById(R.id.btn_guardar_alteracoes);
|
||||
btnVoltar = findViewById(R.id.btn_voltar);
|
||||
imgPerfil = findViewById(R.id.img_perfil_edit);
|
||||
fabEditPhoto = findViewById(R.id.fab_edit_photo);
|
||||
|
||||
// Verificação defensiva
|
||||
if (btnGuardar == null || nameEditText == null) {
|
||||
Toast.makeText(this, "Erro: Interface não carregada.", Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// Click Listeners
|
||||
if (fabEditPhoto != null) fabEditPhoto.setOnClickListener(v -> pickImage());
|
||||
if (imgPerfil != null) imgPerfil.setOnClickListener(v -> pickImage());
|
||||
// Listeners
|
||||
if (fabEditPhoto != null) fabEditPhoto.setOnClickListener(v -> pickMedia.launch("image/*"));
|
||||
if (horarioInicioEditText != null) horarioInicioEditText.setOnClickListener(v -> showTimePicker(horarioInicioEditText));
|
||||
if (horarioFimEditText != null) horarioFimEditText.setOnClickListener(v -> showTimePicker(horarioFimEditText));
|
||||
if (btnVoltar != null) btnVoltar.setOnClickListener(v -> finish());
|
||||
|
||||
btnGuardar.setOnClickListener(v -> {
|
||||
try {
|
||||
guardarAlteracoes();
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Erro ao guardar: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
if (btnGuardar != null) btnGuardar.setOnClickListener(v -> validarEGuardar());
|
||||
|
||||
setupGenderDropdown();
|
||||
carregarDados();
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Erro ao abrir edição: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
|
||||
} catch (Throwable t) {
|
||||
Toast.makeText(this, "Erro: " + t.toString(), Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void setupGenderDropdown() {
|
||||
String[] genders = new String[]{"Masculino", "Feminino", "Outro"};
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_dropdown_item_1line, genders);
|
||||
if (genderAutoComplete != null) genderAutoComplete.setAdapter(adapter);
|
||||
}
|
||||
|
||||
private void pickImage() {
|
||||
pickMedia.launch("image/*");
|
||||
private void showTimePicker(TextInputEditText editText) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
new TimePickerDialog(this, (view, hour, minute) -> {
|
||||
editText.setText(String.format(Locale.getDefault(), "%02d:%02d", hour, minute));
|
||||
}, c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE), true).show();
|
||||
}
|
||||
|
||||
private void carregarDados() {
|
||||
// Carregar de ambas as coleções para garantir que não faltam campos
|
||||
db.collection("medicos").document(currentUserId).get().addOnSuccessListener(docMed -> {
|
||||
if (docMed.exists()) {
|
||||
preencherCampos(docMed);
|
||||
loadProfileImage(getStringFromDoc(docMed, "foto_url"));
|
||||
}
|
||||
|
||||
// Depois carregar utilizadores e sobrescrever/preencher o que faltar
|
||||
db.collection("utilizadores").document(currentUserId).get().addOnSuccessListener(doc -> {
|
||||
if (doc.exists()) {
|
||||
preencherCampos(doc); // Preenche novamente, campos não nulos sobrescrevem
|
||||
String foto = getStringFromDoc(doc, "foto_url");
|
||||
if (foto != null && !foto.isEmpty()) {
|
||||
loadProfileImage(foto);
|
||||
db.collection("medicos").document(currentUserId).get().addOnSuccessListener(doc -> {
|
||||
if (doc.exists()) {
|
||||
try {
|
||||
if (nameEditText != null) nameEditText.setText(doc.getString("nome_completo"));
|
||||
if (specialtyEditText != null) specialtyEditText.setText(doc.getString("especialidade"));
|
||||
if (emailEditText != null) emailEditText.setText(doc.getString("email"));
|
||||
|
||||
String sexo = doc.getString("sexo");
|
||||
if (sexo != null && rgGender != null) {
|
||||
if (sexo.equalsIgnoreCase("Masculino")) rgGender.check(R.id.rb_masculino);
|
||||
else if (sexo.equalsIgnoreCase("Feminino")) rgGender.check(R.id.rb_feminino);
|
||||
else if (sexo.equalsIgnoreCase("Outro")) rgGender.check(R.id.rb_outro);
|
||||
}
|
||||
}
|
||||
});
|
||||
}).addOnFailureListener(e -> {
|
||||
// Se falhar medicos, tenta utilizadores na mesma
|
||||
db.collection("utilizadores").document(currentUserId).get().addOnSuccessListener(doc -> {
|
||||
if (doc.exists()) {
|
||||
preencherCampos(doc);
|
||||
loadProfileImage(getStringFromDoc(doc, "foto_url"));
|
||||
}
|
||||
}).addOnFailureListener(e2 -> Toast.makeText(this, "Erro ao carregar dados.", Toast.LENGTH_SHORT).show());
|
||||
|
||||
String horario = doc.getString("horario");
|
||||
if (horario != null && horario.contains(" - ")) {
|
||||
String[] parts = horario.split(" - ");
|
||||
if (parts.length == 2) {
|
||||
horarioInicioEditText.setText(parts[0]);
|
||||
horarioFimEditText.setText(parts[1]);
|
||||
}
|
||||
}
|
||||
|
||||
currentPhotoUrl = doc.getString("foto_url");
|
||||
if (currentPhotoUrl != null && !currentPhotoUrl.isEmpty() && imgPerfil != null) {
|
||||
Glide.with(this).load(currentPhotoUrl).circleCrop().into(imgPerfil);
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadProfileImage(String url) {
|
||||
currentPhotoUrl = url;
|
||||
// Reativado Glide com verificação de segurança
|
||||
if (currentPhotoUrl != null && !currentPhotoUrl.isEmpty() && imgPerfil != null && !isFinishing()) {
|
||||
Glide.with(this)
|
||||
.load(currentPhotoUrl)
|
||||
.placeholder(R.drawable.ic_user)
|
||||
.circleCrop()
|
||||
.into(imgPerfil);
|
||||
}
|
||||
}
|
||||
|
||||
private void preencherCampos(com.google.firebase.firestore.DocumentSnapshot doc) {
|
||||
if (doc == null || !doc.exists()) return;
|
||||
|
||||
try {
|
||||
String nome = getStringFromDoc(doc, "nome_completo");
|
||||
if (TextUtils.isEmpty(nome)) nome = getStringFromDoc(doc, "nome");
|
||||
if (!TextUtils.isEmpty(nome) && nameEditText != null) nameEditText.setText(nome);
|
||||
|
||||
String specialty = getStringFromDoc(doc, "especialidade");
|
||||
if (!TextUtils.isEmpty(specialty) && specialtyEditText != null) specialtyEditText.setText(specialty);
|
||||
|
||||
String email = getStringFromDoc(doc, "email");
|
||||
if (!TextUtils.isEmpty(email) && emailEditText != null) emailEditText.setText(email);
|
||||
|
||||
String horario = getStringFromDoc(doc, "horario");
|
||||
if (horario != null && horario.contains(" - ")) {
|
||||
String[] parts = horario.split(" - ");
|
||||
if (parts.length == 2) {
|
||||
if (horarioInicioEditText != null) horarioInicioEditText.setText(parts[0]);
|
||||
if (horarioFimEditText != null) horarioFimEditText.setText(parts[1]);
|
||||
}
|
||||
} else if (!TextUtils.isEmpty(horario) && horarioInicioEditText != null) {
|
||||
horarioInicioEditText.setText(horario);
|
||||
}
|
||||
|
||||
String gender = getStringFromDoc(doc, "sexo");
|
||||
if (!TextUtils.isEmpty(gender) && genderAutoComplete != null) {
|
||||
genderAutoComplete.setText(gender, false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("EditarPerfil", "Erro ao preencher campos: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void guardarAlteracoes() {
|
||||
String name = nameEditText.getText() != null ? nameEditText.getText().toString().trim() : "";
|
||||
String specialty = specialtyEditText.getText() != null ? specialtyEditText.getText().toString().trim() : "";
|
||||
String gender = genderAutoComplete.getText() != null ? genderAutoComplete.getText().toString().trim() : "";
|
||||
|
||||
String hInicio = horarioInicioEditText.getText() != null ? horarioInicioEditText.getText().toString().trim() : "";
|
||||
String hFim = horarioFimEditText.getText() != null ? horarioFimEditText.getText().toString().trim() : "";
|
||||
String horario = (!hInicio.isEmpty() && !hFim.isEmpty()) ? hInicio + " - " + hFim : hInicio;
|
||||
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
nameEditText.setError("O nome é obrigatório");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(specialty)) {
|
||||
specialtyEditText.setError("A especialidade é obrigatória");
|
||||
return;
|
||||
}
|
||||
private void validarEGuardar() {
|
||||
String name = nameEditText.getText().toString().trim();
|
||||
if (name.isEmpty()) { nameEditText.setError("Obrigatório"); return; }
|
||||
|
||||
btnGuardar.setEnabled(false);
|
||||
|
||||
if (selectedImageUri != null) {
|
||||
uploadImageAndSaveData(name, specialty, gender, horario);
|
||||
uploadImage(name);
|
||||
} else {
|
||||
saveData(name, specialty, gender, horario, currentPhotoUrl);
|
||||
saveToFirestore(name, currentPhotoUrl);
|
||||
}
|
||||
}
|
||||
|
||||
private void uploadImageAndSaveData(String name, String specialty, String gender, String horario) {
|
||||
String fileName = "profile_pics/" + currentUserId + ".jpg";
|
||||
StorageReference ref = storage.getReference().child(fileName);
|
||||
|
||||
ref.putFile(selectedImageUri)
|
||||
.addOnSuccessListener(taskSnapshot -> ref.getDownloadUrl().addOnSuccessListener(uri -> {
|
||||
saveData(name, specialty, gender, horario, uri.toString());
|
||||
}))
|
||||
.addOnFailureListener(e -> {
|
||||
Toast.makeText(this, "Erro ao carregar imagem.", Toast.LENGTH_SHORT).show();
|
||||
btnGuardar.setEnabled(true);
|
||||
});
|
||||
private void uploadImage(String name) {
|
||||
StorageReference ref = storage.getReference().child("perfil_medicos/" + currentUserId + ".jpg");
|
||||
ref.putFile(selectedImageUri).addOnSuccessListener(task -> {
|
||||
ref.getDownloadUrl().addOnSuccessListener(uri -> saveToFirestore(name, uri.toString()));
|
||||
}).addOnFailureListener(e -> {
|
||||
btnGuardar.setEnabled(true);
|
||||
Toast.makeText(this, "Erro foto", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
}
|
||||
|
||||
private void saveData(String name, String specialty, String gender, String horario, String photoUrl) {
|
||||
WriteBatch batch = db.batch();
|
||||
|
||||
Map<String, Object> updates = new HashMap<>();
|
||||
updates.put("id", currentUserId);
|
||||
updates.put("nome_completo", name);
|
||||
updates.put("nome", name); // Compatibilidade com outras partes da app
|
||||
updates.put("especialidade", specialty);
|
||||
updates.put("sexo", gender);
|
||||
updates.put("horario", horario);
|
||||
updates.put("tipo", "medico");
|
||||
|
||||
if (photoUrl != null) {
|
||||
updates.put("foto_url", photoUrl);
|
||||
private void saveToFirestore(String name, String photoUrl) {
|
||||
String gender = "";
|
||||
if (rgGender != null) {
|
||||
int sid = rgGender.getCheckedRadioButtonId();
|
||||
if (sid == R.id.rb_masculino) gender = "Masculino";
|
||||
else if (sid == R.id.rb_feminino) gender = "Feminino";
|
||||
else if (sid == R.id.rb_outro) gender = "Outro";
|
||||
}
|
||||
|
||||
DocumentReference userRef = db.collection("utilizadores").document(currentUserId);
|
||||
DocumentReference medicoRef = db.collection("medicos").document(currentUserId);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("nome_completo", name);
|
||||
map.put("especialidade", specialtyEditText.getText().toString().trim());
|
||||
map.put("email", emailEditText.getText().toString().trim());
|
||||
map.put("sexo", gender);
|
||||
|
||||
String h = horarioInicioEditText.getText().toString() + " - " + horarioFimEditText.getText().toString();
|
||||
map.put("horario", h);
|
||||
if (photoUrl != null) map.put("foto_url", photoUrl);
|
||||
|
||||
batch.set(userRef, updates, SetOptions.merge());
|
||||
batch.set(medicoRef, updates, SetOptions.merge());
|
||||
com.google.firebase.firestore.WriteBatch batch = db.batch();
|
||||
batch.set(db.collection("medicos").document(currentUserId), map, com.google.firebase.firestore.SetOptions.merge());
|
||||
batch.set(db.collection("utilizadores").document(currentUserId), map, com.google.firebase.firestore.SetOptions.merge());
|
||||
|
||||
batch.commit()
|
||||
.addOnSuccessListener(aVoid -> {
|
||||
// Atualizar cache local para refletir mudanças instantaneamente na MainActivity
|
||||
getSharedPreferences("SessaoMedico", MODE_PRIVATE)
|
||||
.edit()
|
||||
.putString("nome_medico", name)
|
||||
.apply();
|
||||
|
||||
Toast.makeText(this, "Dados atualizados com sucesso!", Toast.LENGTH_SHORT).show();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
})
|
||||
.addOnFailureListener(e -> {
|
||||
Log.e("EditarPerfil", "Erro ao guardar dados: " + e.getMessage());
|
||||
Toast.makeText(this, "Erro ao guardar: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
btnGuardar.setEnabled(true);
|
||||
});
|
||||
}
|
||||
|
||||
private void showTimePicker(TextInputEditText editText) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
TimePickerDialog timePickerDialog = new TimePickerDialog(this,
|
||||
(view, hourOfDay, minuteOfHour) -> {
|
||||
String time = String.format(Locale.getDefault(), "%02d:%02d", hourOfDay, minuteOfHour);
|
||||
editText.setText(time);
|
||||
}, calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), true);
|
||||
timePickerDialog.show();
|
||||
}
|
||||
|
||||
private String getStringFromDoc(com.google.firebase.firestore.DocumentSnapshot doc, String field) {
|
||||
Object val = doc.get(field);
|
||||
return val != null ? String.valueOf(val) : null;
|
||||
batch.commit().addOnSuccessListener(aVoid -> {
|
||||
Toast.makeText(this, "Perfil Atualizado!", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}).addOnFailureListener(e -> {
|
||||
btnGuardar.setEnabled(true);
|
||||
Toast.makeText(this, "Erro ao gravar", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ public class MainActivity extends AppCompatActivity
|
||||
layTop = findViewById(R.id.lay_top);
|
||||
|
||||
tvGreetingMain = findViewById(R.id.tv_greeting_main);
|
||||
imgPerfilHeader = findViewById(R.id.img_perfil_header);
|
||||
|
||||
// Carregar nome da sessão local para exibir INSTANTANEAMENTE
|
||||
String cachedName = getSharedPreferences("SessaoMedico", MODE_PRIVATE).getString("nome_medico", "");
|
||||
@@ -209,6 +210,12 @@ public class MainActivity extends AppCompatActivity
|
||||
if (imgPerfilMain != null) {
|
||||
imgPerfilMain.setOnClickListener(v -> abrirEditarPerfil());
|
||||
}
|
||||
if (imgPerfilHeader != null) {
|
||||
imgPerfilHeader.setOnClickListener(v -> {
|
||||
viewPerfil.setVisibility(View.VISIBLE);
|
||||
viewPerfil.bringToFront();
|
||||
});
|
||||
}
|
||||
|
||||
if (btnLogout != null) {
|
||||
btnLogout.setOnClickListener(v -> {
|
||||
@@ -219,6 +226,12 @@ public class MainActivity extends AppCompatActivity
|
||||
});
|
||||
}
|
||||
|
||||
// Setup FAB
|
||||
com.google.android.material.floatingactionbutton.FloatingActionButton fabAdd = findViewById(R.id.fab_add_consulta);
|
||||
if (fabAdd != null) {
|
||||
fabAdd.setOnClickListener(v -> showScheduleAppointmentDialog());
|
||||
}
|
||||
|
||||
// Setup BottomNavigation
|
||||
BottomNavigationView bottomNav = findViewById(R.id.bottom_navigation);
|
||||
bottomNav.setSelectedItemId(R.id.nav_agenda);
|
||||
@@ -229,32 +242,29 @@ public class MainActivity extends AppCompatActivity
|
||||
if (viewAceites != null)
|
||||
viewAceites.setVisibility(View.GONE);
|
||||
layTop.setVisibility(View.GONE);
|
||||
if (fabAdd != null) fabAdd.setVisibility(View.GONE); // Default hidden
|
||||
|
||||
if (item.getItemId() == R.id.nav_agenda) {
|
||||
if (item.getItemId() == R.id.nav_perfil) {
|
||||
viewPerfil.setVisibility(View.VISIBLE);
|
||||
viewPerfil.bringToFront();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.nav_agenda) {
|
||||
viewAgenda.setVisibility(View.VISIBLE);
|
||||
layTop.setVisibility(View.VISIBLE);
|
||||
if (fabAdd != null) fabAdd.setVisibility(View.VISIBLE);
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.nav_pacientes) {
|
||||
viewPacientes.setVisibility(View.VISIBLE);
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.nav_perfil) {
|
||||
viewPerfil.setVisibility(View.VISIBLE);
|
||||
if (fabAdd != null) fabAdd.setVisibility(View.VISIBLE);
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.nav_aceites) {
|
||||
if (viewAceites != null)
|
||||
viewAceites.setVisibility(View.VISIBLE);
|
||||
if (viewAceites != null) viewAceites.setVisibility(View.VISIBLE);
|
||||
updateHistoryDateDisplay();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Setup FAB
|
||||
com.google.android.material.floatingactionbutton.FloatingActionButton fabAdd = findViewById(R.id.fab_add_consulta);
|
||||
if (fabAdd != null) {
|
||||
fabAdd.setOnClickListener(v -> showScheduleAppointmentDialog());
|
||||
}
|
||||
|
||||
// Load Initial Data
|
||||
loadUtilizadores();
|
||||
loadPerfilMedico();
|
||||
@@ -264,8 +274,9 @@ public class MainActivity extends AppCompatActivity
|
||||
loadConsultasAgendaForDate(today);
|
||||
updateHistoryDateDisplay();
|
||||
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Erro Init: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
} catch (Throwable t) {
|
||||
Toast.makeText(this, "Erro Crítico: " + t.toString(), Toast.LENGTH_LONG).show();
|
||||
Log.e("MainActivity", "ERRO NO ONCREATE", t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,14 +398,11 @@ public class MainActivity extends AppCompatActivity
|
||||
}
|
||||
|
||||
private void abrirEditarPerfil() {
|
||||
Log.d("MainActivity", "A tentar abrir EditarPerfilActivity");
|
||||
Toast.makeText(this, "A abrir o seu perfil...", Toast.LENGTH_SHORT).show();
|
||||
try {
|
||||
Intent intent = new Intent(MainActivity.this, EditarPerfilActivity.class);
|
||||
Intent intent = new Intent(this, EditarPerfilActivity.class);
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Erro ao abrir: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
Log.e("MainActivity", "Erro navegação: " + e.getMessage());
|
||||
} catch (Throwable t) {
|
||||
Toast.makeText(this, "Erro ao abrir ecrã: " + t.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,12 +653,21 @@ public class MainActivity extends AppCompatActivity
|
||||
tvHorario.setText("Horário: " + (horario != null && !horario.isEmpty() ? horario : "--"));
|
||||
|
||||
String fotoUrl = doc.getString("foto_url");
|
||||
if (fotoUrl != null && !fotoUrl.isEmpty() && imgPerfilMain != null) {
|
||||
com.bumptech.glide.Glide.with(this)
|
||||
.load(fotoUrl)
|
||||
.placeholder(R.drawable.ic_user)
|
||||
.circleCrop()
|
||||
.into(imgPerfilMain);
|
||||
if (fotoUrl != null && !fotoUrl.isEmpty()) {
|
||||
if (imgPerfilMain != null) {
|
||||
com.bumptech.glide.Glide.with(MainActivity.this)
|
||||
.load(fotoUrl)
|
||||
.placeholder(R.drawable.ic_user)
|
||||
.circleCrop()
|
||||
.into(imgPerfilMain);
|
||||
}
|
||||
if (imgPerfilHeader != null) {
|
||||
com.bumptech.glide.Glide.with(MainActivity.this)
|
||||
.load(fotoUrl)
|
||||
.placeholder(R.drawable.ic_user)
|
||||
.circleCrop()
|
||||
.into(imgPerfilHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="80dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_sair_detalhe"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
||||
@@ -1,177 +1,275 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:fillViewport="true"
|
||||
android:background="@color/background_color">
|
||||
android:background="@color/surface_color"
|
||||
tools:context=".EditarPerfilActivity">
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="40dp"
|
||||
android:paddingHorizontal="24dp">
|
||||
android:background="@android:color/transparent"
|
||||
app:elevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_voltar"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
app:tint="?attr/colorPrimary"/>
|
||||
|
||||
<TextView
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Editar Dados Pessoais"
|
||||
android:textSize="28sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="32dp"/>
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:navigationIcon="@drawable/ic_arrow_back"
|
||||
app:navigationIconTint="?attr/colorPrimary"
|
||||
app:title="Editar Perfil"
|
||||
app:titleCentered="true"
|
||||
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
app:titleTextColor="?attr/colorPrimary" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/img_perfil_edit"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@drawable/ic_user"
|
||||
android:padding="2dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:shapeAppearanceOverlay="@style/CircleImageView"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_edit_photo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignEnd="@id/img_perfil_edit"
|
||||
android:layout_alignBottom="@id/img_perfil_edit"
|
||||
android:src="@drawable/ic_camera"
|
||||
app:fabSize="mini"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:tint="@color/white"
|
||||
android:contentDescription="Editar foto"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Nome"
|
||||
android:inputType="textPersonName"
|
||||
android:imeOptions="actionNext"
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_specialty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Especialidade"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionNext"
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="Sexo">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/edit_gender"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
<!-- Profile Picture Section -->
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_horario_inicio"
|
||||
android:layout_width="match_parent"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
app:cardCornerRadius="65dp"
|
||||
app:cardElevation="4dp"
|
||||
app:strokeColor="?attr/colorPrimary"
|
||||
app:strokeWidth="3dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/img_perfil_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_user"
|
||||
app:shapeAppearanceOverlay="@style/CircleImageView" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_edit_photo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Início"
|
||||
android:focusable="false"
|
||||
android:clickable="true"
|
||||
android:inputType="none" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="4dp"
|
||||
app:fabCustomSize="40dp"
|
||||
app:srcCompat="@drawable/ic_camera"
|
||||
app:tint="@color/white"
|
||||
app:backgroundTint="?attr/colorPrimary" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_horario_fim"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Fim"
|
||||
android:focusable="false"
|
||||
android:clickable="true"
|
||||
android:inputType="none" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_email"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="Email (Não editável)"
|
||||
android:inputType="textEmailAddress" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_guardar_alteracoes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:text="GUARDAR ALTERAÇÕES"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="30dp"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
android:textColor="@color/white"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Informações Básicas"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<!-- Nome -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="Nome Completo"
|
||||
app:startIconDrawable="@drawable/ic_user"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusTopStart="12dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Especialidade -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="Especialidade Médica"
|
||||
app:startIconDrawable="@drawable/ic_nav_pacientes"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusTopStart="12dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_specialty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Género"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_gender"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_masculino"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Masculino"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_feminino"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:text="Feminino"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_outro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:text="Outro"/>
|
||||
</RadioGroup>
|
||||
|
||||
<!-- Email -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:hint="Email de Contacto"
|
||||
app:startIconDrawable="@drawable/ic_nav_contactos"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusTopStart="12dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:enabled="false" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Horário de Disponibilidade"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:hint="Início"
|
||||
app:startIconDrawable="@drawable/ic_calendar"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusTopStart="12dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_horario_inicio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
android:clickable="true" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:hint="Fim"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusTopStart="12dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_horario_fim"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
android:clickable="true" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_guardar_alteracoes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:text="Guardar Alterações"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:elevation="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -17,14 +17,33 @@
|
||||
android:background="@drawable/bg_gradient_header"
|
||||
android:elevation="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_greeting_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Olá"
|
||||
android:textSize="38sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="@color/white"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_greeting_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Olá"
|
||||
android:textSize="32sp"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/img_perfil_header"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_user"
|
||||
android:padding="2dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@color/white"
|
||||
app:shapeAppearanceOverlay="@style/CircleImageView" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
||||
Reference in New Issue
Block a user