Caste, Sub Caste and Gender entry updated
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,6 +10,7 @@
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
/app/google-services.json
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
|
||||
@@ -55,12 +55,24 @@ class UserDetailsRegistrationFragment : Fragment() {
|
||||
private fun autoFillUserData(user: UserData) {
|
||||
with(binding) {
|
||||
user.birthYear.let { etYob.setText(it) }
|
||||
user.gender.let { etGenderBlock.setText(it, false) }
|
||||
user.gender.let {
|
||||
when (it) {
|
||||
"Male" -> {
|
||||
male.isChecked = true
|
||||
}
|
||||
"Female" -> {
|
||||
female.isChecked = true
|
||||
}
|
||||
else -> {
|
||||
other.isChecked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
user.phoneNumber.let { etMobile.setText(it) }
|
||||
user.careOf.let { etCareof.setText(it) }
|
||||
user.maritalStatus.let { etIsMarried.setText(it, false) }
|
||||
user.caste.let { etCaste.setText(it) }
|
||||
user.category.let { etCategory.setText(it) }
|
||||
user.caste.let { etCaste.setText(it, false) }
|
||||
user.category.let { etCategory.setText(it, false) }
|
||||
user.subCaste.let { etSubCaste.setText(it) }
|
||||
user.house.let { etHouse.setText(it) }
|
||||
user.city.let { etCity.setText(it) }
|
||||
@@ -132,12 +144,12 @@ class UserDetailsRegistrationFragment : Fragment() {
|
||||
userData.birthYear = yob
|
||||
}
|
||||
|
||||
val gender = etGenderBlock.text.toString()
|
||||
if (gender.isEmpty()) {
|
||||
etGenderBlock.error = "Please enter your gender"
|
||||
return false
|
||||
if (male.isChecked) {
|
||||
userData.gender = "Male"
|
||||
} else if (female.isChecked) {
|
||||
userData.gender = "Female"
|
||||
} else {
|
||||
userData.gender = gender
|
||||
userData.gender = "Other"
|
||||
}
|
||||
|
||||
val mobile = etMobile.text.toString()
|
||||
|
||||
@@ -169,8 +169,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/center_name"
|
||||
android:inputType="text"
|
||||
android:maxLength="12" />
|
||||
android:inputType="text" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -48,27 +48,39 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_gender"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
<RadioGroup
|
||||
android:id="@+id/gender"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/til_yob">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/et_gender_block"
|
||||
android:layout_width="match_parent"
|
||||
<RadioButton
|
||||
android:id="@+id/male"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/gender"
|
||||
android:inputType="none"
|
||||
android:labelFor="@id/til_gender"
|
||||
app:simpleItems="@array/gender" />
|
||||
android:layout_marginStart="10dp"
|
||||
android:checked="true"
|
||||
android:text="@string/male"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<RadioButton
|
||||
android:id="@+id/female"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/female"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/other"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/other"
|
||||
android:textSize="16sp" />
|
||||
</RadioGroup>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_mobile"
|
||||
@@ -79,7 +91,7 @@
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/til_gender">
|
||||
app:layout_constraintTop_toBottomOf="@id/gender">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_mobile"
|
||||
@@ -134,7 +146,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_category"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
@@ -143,17 +155,20 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/til_is_married">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/et_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/_2" />
|
||||
android:hint="@string/category"
|
||||
android:inputType="none"
|
||||
android:labelFor="@id/til_is_married"
|
||||
app:simpleItems="@array/category" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_caste"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
@@ -162,11 +177,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/til_category">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/et_Caste"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/caste" />
|
||||
android:hint="@string/caste"
|
||||
android:inputType="none"
|
||||
android:labelFor="@id/til_is_married"
|
||||
app:simpleItems="@array/caste" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
<string name="review">Review</string>
|
||||
<string name="blood_group">Select Blood Group</string>
|
||||
<string name="house">House</string>
|
||||
<string name="is_patient_under_any_medication">Is user under any medication or treatment?</string>
|
||||
<string name="is_patient_undergoing_any_blood_transfusion">Is user undergoing any blood transfusion?</string>
|
||||
<string name="is_patient_under_any_medication">Have you been under medication for Sickle Cell in the past three months?</string>
|
||||
<string name="is_patient_undergoing_any_blood_transfusion">Have you undergone any Blood transfusions in the Past three months ?</string>
|
||||
|
||||
<string name="user_list">User List</string>
|
||||
<string name="register_user">Register User</string>
|
||||
@@ -83,13 +83,55 @@
|
||||
<string name="password">Password</string>
|
||||
<string name="login">Login</string>
|
||||
<string name="_2">Category</string>
|
||||
<string name="category">Category</string>
|
||||
<string name="male">Male</string>
|
||||
<string name="female">Female</string>
|
||||
<string name="other">Other</string>
|
||||
|
||||
|
||||
<string-array name="category">
|
||||
<item>GEN</item>
|
||||
<item>OBC</item>
|
||||
<item>OPEN</item>
|
||||
<item>SC</item>
|
||||
<item>OBC</item>
|
||||
<item>NT-A</item>
|
||||
<item>NT-B</item>
|
||||
<item>NT-C</item>
|
||||
<item>NT-D</item>
|
||||
<item>SBC</item>
|
||||
<item>ST</item>
|
||||
<item>OTHER</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="caste">
|
||||
<item>KOLI</item>
|
||||
<item>MAHAR</item>
|
||||
<item>BUDDHIST</item>
|
||||
<item>GOND</item>
|
||||
<item>KUNBI</item>
|
||||
<item>TELI</item>
|
||||
<item>AHIR</item>
|
||||
<item>LOHAR</item>
|
||||
<item>MUSLIM</item>
|
||||
<item>BRAHMAN</item>
|
||||
<item>PAWAR</item>
|
||||
<item>CHAMBHAR</item>
|
||||
<item>KOSHTI</item>
|
||||
<item>CHAMAR</item>
|
||||
<item>KUMBHAR</item>
|
||||
<item>DHIWAR</item>
|
||||
<item>BARAI</item>
|
||||
<item>MANNA</item>
|
||||
<item>PARDESI</item>
|
||||
<item>NAVI</item>
|
||||
<item>FULMALI</item>
|
||||
<item>SHAHU</item>
|
||||
<item>JAIN</item>
|
||||
<item>KURMI</item>
|
||||
<item>SONAR</item>
|
||||
<item>MALI</item>
|
||||
<item>DEWANGAN</item>
|
||||
<item>MOURYA</item>
|
||||
<item>OTHER</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="marital_status">
|
||||
|
||||
Reference in New Issue
Block a user