Files
hpos-registration-app/.idea/shelf/Changes/shelved.patch

233 lines
44 KiB
Diff

Index: app/src/main/java/com/example/hposregistration/ui/fragments/registration/UserDetailsRegistrationFragment.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>package com.example.hposregistration.ui.fragments.registration\r\n\r\nimport android.os.Bundle\r\nimport android.view.LayoutInflater\r\nimport android.view.View\r\nimport android.view.ViewGroup\r\nimport android.widget.Toast\r\nimport androidx.fragment.app.Fragment\r\nimport androidx.fragment.app.viewModels\r\nimport androidx.navigation.fragment.findNavController\r\nimport androidx.navigation.fragment.navArgs\r\nimport com.example.hposregistration.data.user.UserData\r\nimport com.example.hposregistration.ui.viewmodels.RegistrationViewModel\r\nimport dagger.hilt.android.AndroidEntryPoint\r\nimport `in`.sminnovations.hposregistration.databinding.FragmentUserDetailsRegistrationBinding\r\n\r\n\r\n@AndroidEntryPoint\r\nclass UserDetailsRegistrationFragment : Fragment() {\r\n\r\n private var _binding: FragmentUserDetailsRegistrationBinding? = null\r\n private val binding get() = _binding!!\r\n\r\n private val viewModel by viewModels<RegistrationViewModel>()\r\n\r\n private lateinit var userData: UserData\r\n\r\n private val args: UserDetailsRegistrationFragmentArgs by navArgs()\r\n\r\n override fun onCreateView(\r\n inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?\r\n ): View {\r\n _binding = FragmentUserDetailsRegistrationBinding.inflate(inflater, container, false)\r\n return binding.root\r\n }\r\n\r\n override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\r\n super.onViewCreated(view, savedInstanceState)\r\n init()\r\n }\r\n\r\n private fun init() {\r\n setupViewModel()\r\n setupSubmitButton()\r\n }\r\n\r\n private fun setupViewModel() {\r\n viewModel.getUserByID(args.userId)\r\n viewModel.userData.observe(viewLifecycleOwner) {\r\n userData = it\r\n autoFillUserData(userData)\r\n }\r\n }\r\n\r\n private fun autoFillUserData(user: UserData) {\r\n with(binding) {\r\n user.birthYear.let { etYob.setText(it) }\r\n user.gender.let {\r\n when (it) {\r\n \"Male\" -> {\r\n male.isChecked = true\r\n }\r\n \"Female\" -> {\r\n female.isChecked = true\r\n }\r\n else -> {\r\n other.isChecked = true\r\n }\r\n }\r\n }\r\n user.phoneNumber.let { etMobile.setText(it) }\r\n user.careOf.let { etCareof.setText(it) }\r\n user.maritalStatus.let { etIsMarried.setText(it, false) }\r\n user.caste.let { etCaste.setText(it, false) }\r\n user.category.let { etCategory.setText(it, false) }\r\n user.subCaste.let { etSubCaste.setText(it) }\r\n user.house.let { etHouse.setText(it) }\r\n user.city.let { etCity.setText(it) }\r\n user.district.let { etDistrict.setText(it) }\r\n user.state.let { etState.setText(it) }\r\n user.pinCode.let { etPincode.setText(it) }\r\n user.isUnderMedication.let {\r\n if (it != null) {\r\n yes.isChecked = it\r\n }\r\n }\r\n user.isUnderTransfusion.let {\r\n if (it != null) {\r\n yes1.isChecked = it\r\n }\r\n }\r\n user.sickleCellHistory.let {\r\n if (it != null) {\r\n yes1history.isChecked = true\r\n }\r\n }\r\n if (yes1history.isChecked) {\r\n if (binding.yes1history.isChecked) View.VISIBLE else View.GONE\r\n\r\n user.sickleCellHistory.let { etFamilyHistory.setText(it) }\r\n } else {\r\n binding.tilFamilyHistory.visibility = View.GONE\r\n }\r\n binding.yes1history.setOnClickListener {\r\n binding.tilFamilyHistory.visibility =\r\n if (binding.yes1history.isChecked) View.VISIBLE else View.GONE\r\n user.sickleCellHistory.let { etFamilyHistory.setText(it) }\r\n\r\n }\r\n binding.no1history.setOnClickListener {\r\n binding.tilFamilyHistory.visibility =\r\n if (binding.no1history.isChecked) View.GONE else View.VISIBLE\r\n }\r\n\r\n\r\n }\r\n }\r\n\r\n private fun setupSubmitButton() {\r\n binding.btnSubmit.setOnClickListener {\r\n if (verifyUserDetails()) {\r\n userData._id = args.userId\r\n viewModel.insert(userData)\r\n navigateToCaptureUserImageFragment()\r\n } else {\r\n showToast(\"Please enter all the details properly\")\r\n }\r\n }\r\n }\r\n\r\n private fun navigateToCaptureUserImageFragment() {\r\n val action = UserDetailsRegistrationFragmentDirections\r\n .actionUserDetailsRegistrationFragmentToCaptureUserImageFragment2(args.userId)\r\n findNavController().navigate(action)\r\n }\r\n\r\n private fun verifyUserDetails(): Boolean {\r\n with(binding) {\r\n val yob = etYob.text.toString()\r\n if (yob.isEmpty() || yob.toInt() <= 1900 || yob.toInt() > 2023) {\r\n etYob.error = \"Please enter a valid birth year between 1900 and 2023\"\r\n return false\r\n } else {\r\n userData.birthYear = yob\r\n }\r\n\r\n if (male.isChecked) {\r\n userData.gender = \"Male\"\r\n } else if (female.isChecked) {\r\n userData.gender = \"Female\"\r\n } else {\r\n userData.gender = \"Other\"\r\n }\r\n\r\n val mobile = etMobile.text.toString()\r\n if (mobile.isEmpty() || mobile.length != 10) {\r\n etMobile.error = \"Please enter a valid 10-digit mobile number\"\r\n return false\r\n } else {\r\n userData.phoneNumber = mobile\r\n }\r\n\r\n val careOf = etCareof.text.toString()\r\n if (careOf.isEmpty()) {\r\n etCareof.error = \"Please enter your name\"\r\n return false\r\n } else {\r\n userData.careOf = careOf\r\n }\r\n\r\n val maritalStatus = etIsMarried.text.toString()\r\n if (maritalStatus.isEmpty()) {\r\n etIsMarried.error = \"Please enter your marital status\"\r\n return false\r\n } else {\r\n userData.maritalStatus = maritalStatus\r\n }\r\n\r\n val category = etCategory.text.toString()\r\n if (category.isEmpty()) {\r\n etCategory.error = \"Please enter your category\"\r\n return false\r\n } else {\r\n userData.category = category\r\n }\r\n\r\n val caste = etCaste.text.toString()\r\n if (caste.isEmpty()) {\r\n etCaste.error = \"Please enter your caste\"\r\n return false\r\n } else {\r\n userData.caste = caste\r\n }\r\n\r\n val subCaste = etSubCaste.text.toString()\r\n if (subCaste.isNotEmpty()) {\r\n userData.subCaste = subCaste\r\n }\r\n\r\n val house = etHouse.text.toString()\r\n if (house.isEmpty()) {\r\n etHouse.error = \"Please enter your house address\"\r\n return false\r\n } else {\r\n userData.house = house\r\n }\r\n\r\n val city = etCity.text.toString()\r\n if (city.isEmpty()) {\r\n etCity.error = \"Please enter your city\"\r\n return false\r\n } else {\r\n userData.city = city\r\n }\r\n\r\n val district = etDistrict.text.toString()\r\n if (district.isEmpty()) {\r\n etDistrict.error = \"Please enter your district\"\r\n return false\r\n } else {\r\n userData.district = district\r\n }\r\n\r\n val state = etState.text.toString()\r\n if (state.isEmpty()) {\r\n etState.error = \"Please enter your state\"\r\n return false\r\n } else {\r\n userData.state = state\r\n }\r\n\r\n val pincode = etPincode.text.toString()\r\n if (pincode.isEmpty() || pincode.length != 6) {\r\n etPincode.error = \"Please enter a valid 6-digit pin code\"\r\n return false\r\n } else {\r\n userData.pinCode = pincode\r\n }\r\n\r\n userData.isUnderMedication = yes.isChecked\r\n userData.isUnderTransfusion = yes1.isChecked\r\n userData.sickleCellHistory = yes1history.isChecked.toString()\r\n\r\n if (yes1history.isChecked) {\r\n val familyHistory = etFamilyHistory.text.toString()\r\n if (familyHistory.isEmpty()) {\r\n etFamilyHistory.error = \"Please enter your family history\"\r\n return false\r\n }\r\n\r\n userData.sickleCellHistory = familyHistory\r\n } else {\r\n\r\n userData.sickleCellHistory = null\r\n\r\n }\r\n\r\n return true\r\n\r\n }\r\n }\r\n\r\n private fun showToast(message: String) {\r\n Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()\r\n }\r\n\r\n override fun onDestroyView() {\r\n super.onDestroyView()\r\n _binding = null\r\n }\r\n}\r\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/com/example/hposregistration/ui/fragments/registration/UserDetailsRegistrationFragment.kt b/app/src/main/java/com/example/hposregistration/ui/fragments/registration/UserDetailsRegistrationFragment.kt
--- a/app/src/main/java/com/example/hposregistration/ui/fragments/registration/UserDetailsRegistrationFragment.kt (revision 8dcec7bb3f98a3494b1e9b0fe44abf82c651e308)
+++ b/app/src/main/java/com/example/hposregistration/ui/fragments/registration/UserDetailsRegistrationFragment.kt (date 1696578456105)
@@ -1,9 +1,12 @@
package com.example.hposregistration.ui.fragments.registration
+import android.content.Context
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.ArrayAdapter
+import android.widget.Filter
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
@@ -12,7 +15,9 @@
import com.example.hposregistration.data.user.UserData
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
import dagger.hilt.android.AndroidEntryPoint
+import `in`.sminnovations.hposregistration.R
import `in`.sminnovations.hposregistration.databinding.FragmentUserDetailsRegistrationBinding
+import java.util.Locale
@AndroidEntryPoint
@@ -39,18 +44,45 @@
init()
}
+
+
private fun init() {
setupViewModel()
setupSubmitButton()
}
+
private fun setupViewModel() {
+ // Initialize the adapters with arrays from resources
+ val categoryItems = resources.getStringArray(R.array.category).toMutableList()
+ val casteItems = resources.getStringArray(R.array.caste).toMutableList()
+
+ val categoryAdapter = DropdownAdapter(requireContext(), categoryItems)
+ val casteAdapter = DropdownAdapter(requireContext(), casteItems)
+ binding.etCategory.setAdapter(categoryAdapter)
+ binding.etCaste.setAdapter(casteAdapter)
+
+// Observe the ViewModel data and update the adapters accordingly
viewModel.getUserByID(args.userId)
- viewModel.userData.observe(viewLifecycleOwner) {
- userData = it
- autoFillUserData(userData)
+ viewModel.userData.observe(viewLifecycleOwner) { user ->
+ user.category?.let {
+ categoryAdapter.clear()
+ categoryAdapter.addAll(it)
+ categoryAdapter.notifyDataSetChanged()
+ }
+ user.caste?.let {
+ casteAdapter.clear()
+ casteAdapter.addAll(it)
+ casteAdapter.notifyDataSetChanged()
+ }
+ autoFillUserData(user)
}
+
}
+
+
+
+
private fun autoFillUserData(user: UserData) {
with(binding) {
@@ -269,3 +301,51 @@
_binding = null
}
}
+
+
+
+class DropdownAdapter(context: Context, private val items: MutableList<String>) :
+ ArrayAdapter<String>(context, android.R.layout.simple_dropdown_item_1line, items) {
+
+ private val filter = ItemFilter()
+
+ override fun getFilter(): Filter {
+ return filter
+ }
+
+ override fun clear() {
+ items.clear()
+ notifyDataSetChanged()
+ }
+
+ private inner class ItemFilter : Filter() {
+ override fun performFiltering(constraint: CharSequence?): FilterResults {
+ val filterResults = FilterResults()
+ val suggestions = mutableListOf<String>()
+
+ if (constraint != null) {
+ for (item in items) {
+ if (item.toLowerCase(Locale.getDefault()).contains(constraint.toString().toLowerCase(Locale.getDefault()))) {
+ suggestions.add(item)
+ }
+ }
+ filterResults.values = suggestions
+ filterResults.count = suggestions.size
+ }
+
+ return filterResults
+ }
+
+ override fun publishResults(constraint: CharSequence?, results: FilterResults?) {
+ clear()
+ if (results != null && results.count > 0) {
+ addAll(results.values as List<String>)
+ notifyDataSetChanged()
+ } else {
+ notifyDataSetInvalidated()
+ }
+ }
+ }
+}
+
+
Index: app/src/main/res/layout/fragment_user_details_registration.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+><?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n xmlns:tools=\"http://schemas.android.com/tools\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"match_parent\"\r\n tools:context=\"com.example.hposregistration.ui.fragments.registration.UserDetailsRegistrationFragment\">\r\n\r\n <ScrollView\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"match_parent\"\r\n tools:layout_editor_absoluteX=\"-16dp\"\r\n tools:layout_editor_absoluteY=\"158dp\">\r\n\r\n <androidx.constraintlayout.widget.ConstraintLayout\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\">\r\n\r\n <TextView\r\n android:id=\"@+id/tv_title\"\r\n style=\"@style/title1\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n android:text=\"@string/enter_person_s_details\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toTopOf=\"parent\" />\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_yob\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"20dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/tv_title\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_yob\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/birth_year\"\r\n android:inputType=\"number\"\r\n android:maxLength=\"4\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <RadioGroup\r\n android:id=\"@+id/gender\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginTop=\"16dp\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:orientation=\"horizontal\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_yob\">\r\n\r\n <RadioButton\r\n android:id=\"@+id/male\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginStart=\"10dp\"\r\n android:checked=\"true\"\r\n android:text=\"@string/male\"\r\n android:textSize=\"16sp\" />\r\n\r\n <RadioButton\r\n android:id=\"@+id/female\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:text=\"@string/female\"\r\n android:textSize=\"16sp\" />\r\n\r\n <RadioButton\r\n android:id=\"@+id/other\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:text=\"@string/other\"\r\n android:textSize=\"16sp\" />\r\n </RadioGroup>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_mobile\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"20dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/gender\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_mobile\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/mobile_number_10_digits\"\r\n android:inputType=\"number\"\r\n android:maxLength=\"10\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_careof\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"20dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_mobile\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_careof\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/father_s_husband_s_name\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_is_married\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"20dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_careof\">\r\n\r\n <AutoCompleteTextView\r\n android:id=\"@+id/et_is_married\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/marital_status\"\r\n android:inputType=\"none\"\r\n android:labelFor=\"@id/til_is_married\"\r\n app:simpleItems=\"@array/marital_status\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_category\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"20dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_is_married\">\r\n\r\n <AutoCompleteTextView\r\n android:id=\"@+id/et_category\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/category\"\r\n android:inputType=\"none\"\r\n android:labelFor=\"@id/til_is_married\"\r\n app:simpleItems=\"@array/category\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_caste\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"20dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_category\">\r\n\r\n <AutoCompleteTextView\r\n android:id=\"@+id/et_Caste\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/caste\"\r\n android:inputType=\"none\"\r\n android:labelFor=\"@id/til_is_married\"\r\n app:simpleItems=\"@array/caste\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_subCaste\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_caste\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_subCaste\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/sub_caste\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <TextView\r\n android:id=\"@+id/tv_title2\"\r\n style=\"@style/title1\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"30dp\"\r\n android:text=\"@string/person_s_address_details\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_subCaste\" />\r\n\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_house\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/tv_title2\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_house\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/house\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_city\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_house\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_city\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/city_town\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_district\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_city\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_district\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/district\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_state\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_district\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_state\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/state\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_pincode\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_state\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_pincode\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:hint=\"@string/pincode\"\r\n android:inputType=\"number\"\r\n android:maxLength=\"6\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <TextView\r\n android:id=\"@+id/tv_title3\"\r\n style=\"@style/title1\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"30dp\"\r\n android:text=\"@string/patient_medical_records\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/til_pincode\" />\r\n\r\n\r\n<!-- <com.google.android.material.textfield.TextInputLayout-->\r\n<!-- android:id=\"@+id/til_blood_group\"-->\r\n<!-- style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu\"-->\r\n<!-- android:layout_width=\"match_parent\"-->\r\n<!-- android:layout_height=\"wrap_content\"-->\r\n<!-- android:layout_marginHorizontal=\"24dp\"-->\r\n<!-- android:layout_marginTop=\"16dp\"-->\r\n<!-- app:layout_constraintEnd_toEndOf=\"parent\"-->\r\n<!-- app:layout_constraintStart_toStartOf=\"parent\"-->\r\n<!-- app:layout_constraintTop_toBottomOf=\"@id/tv_title3\">-->\r\n\r\n<!-- <AutoCompleteTextView-->\r\n<!-- android:id=\"@+id/et_blood_group\"-->\r\n<!-- android:layout_width=\"match_parent\"-->\r\n<!-- android:layout_height=\"wrap_content\"-->\r\n<!-- android:hint=\"@string/blood_group\"-->\r\n<!-- android:inputType=\"none\"-->\r\n<!-- android:labelFor=\"@id/til_blood_group\"-->\r\n<!-- app:simpleItems=\"@array/blood_group\" />-->\r\n\r\n<!-- </com.google.android.material.textfield.TextInputLayout>-->\r\n\r\n <TextView\r\n android:id=\"@+id/cb_item1\"\r\n style=\"@style/title1_2\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n android:text=\"@string/is_patient_under_any_medication\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/tv_title3\" />\r\n\r\n <RadioGroup\r\n android:id=\"@+id/radioGroup\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:orientation=\"horizontal\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@+id/cb_item1\">\r\n\r\n <RadioButton\r\n android:id=\"@+id/yes\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginStart=\"10dp\"\r\n android:text=\"Yes\"\r\n android:textSize=\"16dp\" />\r\n\r\n <RadioButton\r\n android:id=\"@+id/no\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:checked=\"true\"\r\n android:text=\"No\"\r\n android:textSize=\"16dp\" />\r\n </RadioGroup>\r\n\r\n <TextView\r\n android:id=\"@+id/cb_item2\"\r\n style=\"@style/title1_2\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:text=\"@string/is_patient_undergoing_any_blood_transfusion\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/radioGroup\" />\r\n\r\n <RadioGroup\r\n android:id=\"@+id/radioGroup1\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:orientation=\"horizontal\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/cb_item2\">\r\n\r\n <RadioButton\r\n android:id=\"@+id/yes1\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginStart=\"10dp\"\r\n android:text=\"Yes\"\r\n android:textSize=\"16dp\" />\r\n\r\n <RadioButton\r\n android:id=\"@+id/no1\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:checked=\"true\"\r\n android:text=\"No\"\r\n android:textSize=\"16dp\" />\r\n </RadioGroup>\r\n <TextView\r\n android:id=\"@+id/cb_item3\"\r\n style=\"@style/title1_2\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:text=\"@string/is_user_having_any_family_history_for_sickle_cell\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/radioGroup1\" />\r\n <RadioGroup\r\n android:id=\"@+id/historyradiogroup\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:orientation=\"horizontal\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/cb_item3\">\r\n\r\n <RadioButton\r\n android:id=\"@+id/yes1history\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_marginStart=\"10dp\"\r\n android:text=\"Yes\"\r\n android:textSize=\"16dp\" />\r\n\r\n <RadioButton\r\n android:id=\"@+id/no1history\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:checked=\"true\"\r\n android:text=\"No\"\r\n android:textSize=\"16dp\" />\r\n </RadioGroup>\r\n\r\n <com.google.android.material.textfield.TextInputLayout\r\n android:id=\"@+id/til_familyHistory\"\r\n style=\"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\r\n android:layout_width=\"0dp\"\r\n android:layout_height=\"100dp\"\r\n android:layout_marginHorizontal=\"24dp\"\r\n android:layout_marginTop=\"16dp\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@id/historyradiogroup\">\r\n\r\n <com.google.android.material.textfield.TextInputEditText\r\n android:id=\"@+id/et_familyHistory\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"90dp\"\r\n android:hint=\"@string/family_history_of_sickle_cell\"\r\n android:inputType=\"text\" />\r\n\r\n </com.google.android.material.textfield.TextInputLayout>\r\n\r\n <com.google.android.material.button.MaterialButton\r\n android:id=\"@+id/btn_submit\"\r\n style=\"@style/title1_1\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_margin=\"24dp\"\r\n android:text=\"@string/proceed\"\r\n android:focusable=\"false\"\r\n app:cornerRadius=\"100dp\"\r\n app:layout_constraintBottom_toBottomOf=\"parent\"\r\n app:layout_constraintEnd_toEndOf=\"parent\"\r\n app:layout_constraintStart_toStartOf=\"parent\"\r\n app:layout_constraintTop_toBottomOf=\"@+id/til_familyHistory\" />\r\n\r\n </androidx.constraintlayout.widget.ConstraintLayout>\r\n\r\n </ScrollView>\r\n\r\n</androidx.constraintlayout.widget.ConstraintLayout>
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/res/layout/fragment_user_details_registration.xml b/app/src/main/res/layout/fragment_user_details_registration.xml
--- a/app/src/main/res/layout/fragment_user_details_registration.xml (revision 8dcec7bb3f98a3494b1e9b0fe44abf82c651e308)
+++ b/app/src/main/res/layout/fragment_user_details_registration.xml (date 1696578017507)
@@ -160,7 +160,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/category"
- android:inputType="none"
+ android:inputType="text"
android:labelFor="@id/til_is_married"
app:simpleItems="@array/category" />
@@ -182,7 +182,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/caste"
- android:inputType="none"
+ android:inputType="text"
android:labelFor="@id/til_is_married"
app:simpleItems="@array/caste" />
Index: .idea/misc.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
--- /dev/null (date 1696574280572)
+++ b/.idea/misc.xml (date 1696574280572)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+</project>
\ No newline at end of file
Index: .idea/modules.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
--- /dev/null (date 1696574278367)
+++ b/.idea/modules.xml (date 1696574278367)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/HPOS_Registration.iml" filepath="$PROJECT_DIR$/.idea/modules/HPOS_Registration.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.androidTest.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.main.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HPOS_Registration.app.unitTest.iml" />
+ </modules>
+ </component>
+</project>
\ No newline at end of file
Index: .idea/.gitignore
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
--- /dev/null (date 1696573475181)
+++ b/.idea/.gitignore (date 1696573475181)
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
Index: .idea/vcs.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
--- /dev/null (date 1696573474982)
+++ b/.idea/vcs.xml (date 1696573474982)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="Git" />
+ </component>
+</project>
\ No newline at end of file