Commit efb2ae08 authored by Ishankha K.C's avatar Ishankha K.C

view baby screen and api connect

parent 1ad4e397
......@@ -3,20 +3,7 @@
<component name="deploymentTargetDropDown">
<value>
<entry key="app">
<State>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="adb-AYAV6R3925006878-kh1m4J._adb-tls-connect._tcp" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-05-21T16:09:48.003353300Z" />
</State>
<State />
</entry>
</value>
</component>
......
......@@ -18,11 +18,13 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.imageview.ShapeableImageView;
import com.kaluwa.enterprises.babycare.R;
import com.kaluwa.enterprises.babycare.activities.UserProfileActivity;
import com.kaluwa.enterprises.babycare.dialogs.EditBabyDialog;
import com.kaluwa.enterprises.babycare.dto.BabyDto;
import java.io.InputStream;
......@@ -83,6 +85,14 @@ public class BabyDashboardAdapter extends RecyclerView.Adapter<BabyDashboardAdap
Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
// Handle item click
holder.clBabyItem.setOnClickListener(v -> {
// Open the EditBabyDialog with the selected BabyDto
EditBabyDialog editBabyDialog = new EditBabyDialog(babyDto);
// Assuming context is an activity, cast it to FragmentActivity to get supportFragmentManager
editBabyDialog.show(((FragmentActivity) context).getSupportFragmentManager(), "EDIT_BABY_DIALOG");
});
}
@Override
......
package com.kaluwa.enterprises.babycare.dialogs;
import static com.kaluwa.enterprises.babycare.utils.Utils.dpToPx;
import static com.kaluwa.enterprises.babycare.utils.Utils.getDateTimeFormatter;
import static com.kaluwa.enterprises.babycare.utils.Utils.setUpDatePicker;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatDialogFragment;
import androidx.appcompat.widget.SwitchCompat;
import com.github.ybq.android.spinkit.SpinKitView;
import com.kaluwa.enterprises.babycare.R;
import com.kaluwa.enterprises.babycare.dto.BabyDto;
import java.time.LocalDate;
public class EditBabyDialog extends AppCompatDialogFragment {
EditBabyDialogInterface babyDialogInterface;
private EditText etFirstname, etLastname, dateDob, etSex, etWeight, etHeight, etBloodType, etEyeColor, etHairColor, etAllergies, etMediConditions, etMedication, etVaccinateRecs, etDocName, etDocContact, etHealthInsuranceInfo, dateFirstSmile, dateFirstTooth, dateFirstWord, dateFirstStep, etFavFoods, etDisFoods, etPEmergConName, etPEmergRelation, etPEmergConNumber, etSEmergConName, etSEmergRelation, etSEmergConNumber, etNotes;
private ImageButton ibPhoto;
private SwitchCompat switchStatus;
private View overlay;
private SpinKitView progressbar;
private BabyDto babyDto;
public EditBabyDialog(BabyDto babyDto) {
this.babyDto = babyDto;
}
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.edit_baby_view_layout, null);
builder
.setView(view)
.setNegativeButton("Cancel", (dialog, which) -> dialog.dismiss())
.setPositiveButton("Update", null);
TextView title = new TextView(getContext());
// You Can Customise your Title here
title.setText("View Your Baby's Information");
title.setBackgroundColor(getResources().getColor(R.color.purple));
title.setPadding(10, 10, 10, 10);
title.setGravity(Gravity.CENTER);
title.setTextColor(Color.WHITE);
title.setTextSize(20);
builder.setCustomTitle(title);
// find views by id
findViews(view);
// Pre-fill data
prefillData();
AlertDialog dialog = builder.create();
dialog.setCanceledOnTouchOutside(false);
// Set button colors after the dialog is shown
dialog.setOnShowListener(dialogInterface -> {
Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);
positiveButton.setTextColor(getResources().getColor(R.color.success_green));
dialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(getResources().getColor(R.color.line_outline));
positiveButton.setOnClickListener(v -> {
applyBabyDto(dialog);
});
// Get the display metrics
DisplayMetrics displayMetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int screenHeight = displayMetrics.heightPixels;
// Convert 30dp to pixels
int margin = dpToPx(getContext(), 65);
// Calculate the available height
int availableHeight = screenHeight - (2 * margin);
// Set the dialog height
WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();
layoutParams.height = availableHeight;
dialog.getWindow().setAttributes(layoutParams);
});
return dialog;
}
// Method to pre-fill the data
private void prefillData() {
if (babyDto != null) {
etFirstname.setText(babyDto.getFirstName());
etLastname.setText(babyDto.getLastName());
dateDob.setText(babyDto.getDob() != null ? babyDto.getDob().toString() : "");
etSex.setText(babyDto.getSex());
etWeight.setText(babyDto.getWeight() != null && babyDto.getWeight() != 0 ? String.valueOf(babyDto.getWeight()) : "");
etHeight.setText(babyDto.getHeight() != null && babyDto.getHeight() != 0 ? String.valueOf(babyDto.getHeight()) : "");
etBloodType.setText(babyDto.getBloodType());
etEyeColor.setText(babyDto.getEyeColor());
etHairColor.setText(babyDto.getHairColor());
etAllergies.setText(babyDto.getAllergies());
etMediConditions.setText(babyDto.getMedicalConditions());
etMedication.setText(babyDto.getMedications());
etVaccinateRecs.setText(babyDto.getVaccinateRecords());
etDocName.setText(babyDto.getDocName());
etDocContact.setText(babyDto.getDocContactNumber());
etHealthInsuranceInfo.setText(babyDto.getHealthInsuranceInfo());
dateFirstSmile.setText(babyDto.getFirstSmileDate() != null ? babyDto.getFirstSmileDate().toString() : "");
dateFirstTooth.setText(babyDto.getFirstToothDate() != null ? babyDto.getFirstToothDate().toString() : "");
dateFirstWord.setText(babyDto.getFirstWordDate() != null ? babyDto.getFirstWordDate().toString() : "");
dateFirstStep.setText(babyDto.getFirstStepDate() != null ? babyDto.getFirstStepDate().toString() : "");
etFavFoods.setText(babyDto.getFavFoods());
etDisFoods.setText(babyDto.getFoodsDislikes());
etPEmergConName.setText(babyDto.getPrimaryEmergencyContactName());
etPEmergRelation.setText(babyDto.getPrimaryEmergencyRelationship());
etPEmergConNumber.setText(babyDto.getPrimaryEmergencyContactNumber());
etSEmergConName.setText(babyDto.getSecondaryEmergencyContactName());
etSEmergRelation.setText(babyDto.getSecondaryEmergencyRelationship());
etSEmergConNumber.setText(babyDto.getSecondaryEmergencyContactNumber());
etNotes.setText(babyDto.getNotes());
switchStatus.setChecked(babyDto.getIsActive());
}
}
private void applyBabyDto(AlertDialog dialog) {
babyDto = validateObjects();
if (babyDto.isSys_validated()) {
babyDialogInterface.parseValues(babyDto, dialog, overlay, progressbar);
}
}
@SuppressLint("NewApi")
private BabyDto validateObjects() {
BabyDto baby = new BabyDto();
baby.setSys_validated(false);
String firstname, lastname, dob, sex, weight, height, bType, eyeColor, hairColor, allergies, medicalConditions, medications, vaccinateRecs, docName, docContact, healthInsuInfo, firstSmile, firstTooth, firstWord, firstStep, favFoods, disFoods, pEmergeConName, pEmergeRelationship, pEmergeContact, sEmergeConName, sEmergeRelationship, sEmergeContact, notes;
firstname = etFirstname.getText().toString();
lastname = etLastname.getText().toString();
dob = dateDob.getText().toString();
sex = etSex.getText().toString();
weight = etWeight.getText().toString();
height = etHeight.getText().toString();
bType = etBloodType.getText().toString();
eyeColor = etEyeColor.getText().toString();
hairColor = etHairColor.getText().toString();
allergies = etAllergies.getText().toString();
medicalConditions = etMediConditions.getText().toString();
medications = etMedication.getText().toString();
vaccinateRecs = etVaccinateRecs.getText().toString();
docName = etDocName.getText().toString();
docContact = etDocContact.getText().toString();
healthInsuInfo = etHealthInsuranceInfo.getText().toString();
firstSmile = dateFirstSmile.getText().toString();
firstTooth = dateFirstTooth.getText().toString();
firstWord = dateFirstWord.getText().toString();
firstStep = dateFirstStep.getText().toString();
favFoods = etFavFoods.getText().toString();
disFoods = etDisFoods.getText().toString();
pEmergeConName = etPEmergConName.getText().toString();
pEmergeRelationship = etPEmergRelation.getText().toString();
pEmergeContact = etPEmergConNumber.getText().toString();
sEmergeConName = etSEmergConName.getText().toString();
sEmergeRelationship = etSEmergRelation.getText().toString();
sEmergeContact = etSEmergConNumber.getText().toString();
notes = etNotes.getText().toString();
if (TextUtils.isEmpty(firstname)) {
etFirstname.setError("First name is required.");
etFirstname.requestFocus();
} else if (TextUtils.isEmpty(dob)) {
dateDob.setError("Date of birth is required.");
dateDob.requestFocus();
} else if (TextUtils.isEmpty(sex)) {
etSex.setError("Gender is required.");
etSex.requestFocus();
} else {
baby.setFirstName(firstname);
baby.setLastName(lastname);
baby.setDob(LocalDate.parse(dob, getDateTimeFormatter()));
baby.setSex(sex);
baby.setIsActive(switchStatus.isChecked());
if (!TextUtils.isEmpty(weight)) {
baby.setWeight(Float.parseFloat(weight));
}
if (!TextUtils.isEmpty(height)) {
baby.setHeight(Float.parseFloat(height));
}
baby.setBloodType(bType);
baby.setEyeColor(eyeColor);
baby.setHairColor(hairColor);
baby.setAllergies(allergies);
baby.setMedicalConditions(medicalConditions);
baby.setMedications(medications);
baby.setVaccinateRecords(vaccinateRecs);
baby.setDocName(docName);
baby.setDocContactNumber(docContact);
baby.setHealthInsuranceInfo(healthInsuInfo);
if (!TextUtils.isEmpty(firstSmile)) {
baby.setFirstSmileDate(LocalDate.parse(firstSmile, getDateTimeFormatter()));
}
if (!TextUtils.isEmpty(firstTooth)) {
baby.setFirstToothDate(LocalDate.parse(firstTooth, getDateTimeFormatter()));
}
if (!TextUtils.isEmpty(firstWord)) {
baby.setFirstWordDate(LocalDate.parse(firstWord, getDateTimeFormatter()));
}
if (!TextUtils.isEmpty(firstStep)) {
baby.setFirstStepDate(LocalDate.parse(firstStep, getDateTimeFormatter()));
}
baby.setFavFoods(favFoods);
baby.setFoodsDislikes(disFoods);
baby.setPrimaryEmergencyContactName(pEmergeConName);
baby.setPrimaryEmergencyRelationship(pEmergeRelationship);
baby.setPrimaryEmergencyContactNumber(pEmergeContact);
baby.setSecondaryEmergencyContactName(sEmergeConName);
baby.setSecondaryEmergencyRelationship(sEmergeRelationship);
baby.setSecondaryEmergencyContactNumber(sEmergeContact);
baby.setNotes(notes);
baby.setSys_validated(true);
}
return baby;
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
// babyDialogInterface = (EditBabyDialogInterface) context;
}
private void findViews(View view) {
etFirstname = view.findViewById(R.id.ebv_et_first_name);
etLastname = view.findViewById(R.id.ebv_et_last_name);
dateDob = view.findViewById(R.id.ebv_et_dob);
etSex = view.findViewById(R.id.ebv_et_sex);
etWeight = view.findViewById(R.id.ebv_et_weight);
etHeight = view.findViewById(R.id.ebv_et_height);
etBloodType = view.findViewById(R.id.ebv_dd_blood_type);
etEyeColor = view.findViewById(R.id.ebv_et_eye_colour);
etHairColor = view.findViewById(R.id.ebv_et_hair_colour);
etAllergies = view.findViewById(R.id.ebv_et_allergies);
etMediConditions = view.findViewById(R.id.ebv_et_medical_conditions);
etMedication = view.findViewById(R.id.ebv_et_medications);
etVaccinateRecs = view.findViewById(R.id.ebv_et_vaccination_recs);
etDocName = view.findViewById(R.id.ebv_et_doc_name);
etDocContact = view.findViewById(R.id.ebv_et_doc_contact);
etHealthInsuranceInfo = view.findViewById(R.id.ebv_et_health_insurance_info);
dateFirstSmile = view.findViewById(R.id.ebv_et_first_smile);
dateFirstTooth = view.findViewById(R.id.ebv_et_first_tooth);
dateFirstWord = view.findViewById(R.id.ebv_et_first_word);
dateFirstStep = view.findViewById(R.id.ebv_et_first_step);
etFavFoods = view.findViewById(R.id.ebv_et_favourite_foods);
etDisFoods = view.findViewById(R.id.ebv_et_food_dislikes);
etPEmergConName = view.findViewById(R.id.ebv_et_p_emergency_con_name);
etPEmergRelation = view.findViewById(R.id.ebv_et_p_emergency_relationship);
etPEmergConNumber = view.findViewById(R.id.ebv_et_p_emergency_con_number);
etSEmergConName = view.findViewById(R.id.ebv_et_s_emergency_con_name);
etSEmergRelation = view.findViewById(R.id.ebv_et_s_emergency_relationship);
etSEmergConNumber = view.findViewById(R.id.ebv_et_s_emergency_con_number);
etNotes = view.findViewById(R.id.ebv_et_notes);
// ibPhoto = view.findViewById(R.id.ebv_ib_photo);
switchStatus = view.findViewById(R.id.ebv_switch_status);
progressbar = view.findViewById(R.id.progress_bar);
overlay = view.findViewById(R.id.overlay);
setUpDatePicker(dateDob, getContext());
setUpDatePicker(dateFirstSmile, getContext());
setUpDatePicker(dateFirstTooth, getContext());
setUpDatePicker(dateFirstWord, getContext());
setUpDatePicker(dateFirstStep, getContext());
}
public interface EditBabyDialogInterface {
void parseValues(BabyDto dto, AlertDialog dialog, View overlay, SpinKitView progressbar);
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Basic Information"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_first_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/first_name_req"
android:inputType="textPersonName"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
<EditText
android:id="@+id/ebv_et_last_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/last_name_label"
android:inputType="textPersonName"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_dob"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/birth_date_req"
android:inputType="date"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"
android:focusable="false" />
<EditText
android:id="@+id/ebv_et_sex"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/sex"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/ebv_switch_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enabled status"
android:layout_marginStart="15dp"
android:fontFamily="@font/kanit_regular"
android:textSize="16sp"/>
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Physical Information"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"
android:paddingTop="12dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_weight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Weight (kg)"
android:inputType="numberDecimal"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
<EditText
android:id="@+id/ebv_et_height"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Height (feet)"
android:inputType="numberDecimal"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_dd_blood_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Blood type"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"
android:contentDescription="dropdown"/>
<EditText
android:id="@+id/ebv_et_eye_colour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Eye colour"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_hair_colour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Hair colour"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Health Information"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"
android:paddingTop="12dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_allergies"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Allergies"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
<EditText
android:id="@+id/ebv_et_medical_conditions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Medical Conditions"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_medications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Medications"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_vaccination_recs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Vaccination Records (rec1 / rec2 / rec3)"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_doc_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Doctor/Pediatrician Name"
android:inputType="textPersonName"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_doc_contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Doctor/Pediatrician Contact Information"
android:inputType="phone"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_health_insurance_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Health Insurance Information"
android:inputType="textMultiLine"
android:minLines="1"
android:maxLines="3"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Development Milestones"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"
android:paddingTop="12dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_first_smile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="First smile"
android:inputType="date"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"
android:focusable="false"/>
<EditText
android:id="@+id/ebv_et_first_tooth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="First tooth"
android:inputType="date"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"
android:focusable="false"/>
<EditText
android:id="@+id/ebv_et_first_word"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="First word"
android:inputType="date"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"
android:focusable="false"/>
<EditText
android:id="@+id/ebv_et_first_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="First step"
android:inputType="date"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"
android:focusable="false"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Dietary Information"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"
android:paddingTop="12dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_favourite_foods"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Favourite foods"
android:inputType="textMultiLine"
android:minLines="1"
android:maxLines="3"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
<EditText
android:id="@+id/ebv_et_food_dislikes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Food dislikes"
android:inputType="textMultiLine"
android:minLines="1"
android:maxLines="3"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Emergency Contact Information"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"
android:paddingTop="12dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_p_emergency_con_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Primary emergency contact name"
android:inputType="textPersonName"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
<EditText
android:id="@+id/ebv_et_p_emergency_relationship"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Primary emergency relationship"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_p_emergency_con_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Primary emergency contact phone number"
android:inputType="phone"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_s_emergency_con_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Secondary emergency contact name"
android:inputType="textPersonName"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
<EditText
android:id="@+id/ebv_et_s_emergency_relationship"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Secondary emergency relationship"
android:inputType="text"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
<EditText
android:id="@+id/ebv_et_s_emergency_con_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Secondary emergency contact phone number"
android:inputType="phone"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Additional Information"
android:textColor="@color/purple"
android:textStyle="bold"
android:fontFamily="@font/jeju_gothic_regular"
android:textSize="18sp"
android:paddingTop="12dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dark_purple"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="4dp"
android:background="@drawable/borders"
android:padding="8dp">
<EditText
android:id="@+id/ebv_et_notes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Notes"
android:inputType="textMultiLine"
android:minLines="1"
android:maxLines="5"
android:textSize="16sp"
android:fontFamily="@font/kanit_regular" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<View
android:id="@+id/overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99D5C5DF"
android:visibility="gone"
android:clickable="true"
android:focusable="true"/>
<com.github.ybq.android.spinkit.SpinKitView
android:id="@+id/progress_bar"
style="@style/SpinKitView.Large.DoubleBounce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:SpinKit_Color="@color/purple"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment