.
This commit is contained in:
12
.idea/deploymentTargetDropDown.xml
generated
12
.idea/deploymentTargetDropDown.xml
generated
@@ -1,6 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="RZCW41EJRPN" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-09-06T10:57:00.017361200Z" />
|
||||
<runningDeviceTargetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
|
||||
@@ -199,11 +199,11 @@ public class EditProfileInfoActivity extends AppCompatActivity implements
|
||||
country_N_states_map.put(country, states);
|
||||
}
|
||||
|
||||
binding.countrySpinner.selectItemByIndex(countryList.indexOf(country));
|
||||
try {
|
||||
binding.countrySpinner.selectItemByIndex(countryList.indexOf(country));
|
||||
binding.stateSpinner.selectItemByIndex(country_N_states_map.get(country).indexOf(state));
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Couldn't load state.", Toast.LENGTH_SHORT).show();
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -303,8 +303,17 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
patientData.city = binding.town.getText().toString();
|
||||
patientData.post_code = binding.zipCode.getText().toString();
|
||||
|
||||
patientData.country = countryList.get(binding.countrySpinner.getSelectedIndex());
|
||||
patientData.state = country_N_states_map.get(patientData.country).get(binding.stateSpinner.getSelectedIndex());
|
||||
try {
|
||||
patientData.country = countryList.get(binding.countrySpinner.getSelectedIndex());
|
||||
} catch (Exception e) {
|
||||
patientData.country = "";
|
||||
}
|
||||
|
||||
try {
|
||||
patientData.state = country_N_states_map.get(patientData.country).get(binding.stateSpinner.getSelectedIndex());
|
||||
} catch (Exception e) {
|
||||
patientData.state = "";
|
||||
}
|
||||
|
||||
patientData.lat = String.valueOf(currentLocation.latitude);
|
||||
patientData.lng = String.valueOf(currentLocation.longitude);
|
||||
@@ -334,33 +343,33 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
// binding.street.setError("Required");
|
||||
// }
|
||||
|
||||
if (binding.town.getText().toString().trim().isEmpty()) {
|
||||
// allOkay = false;
|
||||
// binding.town.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (binding.zipCode.getText().toString().trim().isEmpty()) {
|
||||
// allOkay = false;
|
||||
// binding.zipCode.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (binding.countrySpinner.getSelectedIndex() == -1) {
|
||||
// allOkay = false;
|
||||
// binding.countrySpinner.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (binding.stateSpinner.getSelectedIndex() == -1) {
|
||||
// allOkay = false;
|
||||
// binding.stateSpinner.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
// if (binding.town.getText().toString().trim().isEmpty()) {
|
||||
//// allOkay = false;
|
||||
//// binding.town.setError("Required");
|
||||
// Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (binding.zipCode.getText().toString().trim().isEmpty()) {
|
||||
//// allOkay = false;
|
||||
//// binding.zipCode.setError("Required");
|
||||
// Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (binding.countrySpinner.getSelectedIndex() == -1) {
|
||||
//// allOkay = false;
|
||||
//// binding.countrySpinner.setError("Required");
|
||||
// Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (binding.stateSpinner.getSelectedIndex() == -1) {
|
||||
//// allOkay = false;
|
||||
//// binding.stateSpinner.setError("Required");
|
||||
// Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (currentLocation == null && allOkay) {
|
||||
allOkay = false;
|
||||
|
||||
Reference in New Issue
Block a user