.
This commit is contained in:
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -2,12 +2,10 @@ package com.ssb.simplitend.patientprofile;
|
||||
|
||||
import com.ssb.simplitend.patientprofile.medicalinfo.mvvm.MedicationInfo;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.FreqNMedTypeResult;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.Reminder;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.ReminderResult;
|
||||
import com.ssb.simplitend.patientprofile.setuproutine.mvvm.RoutineDetails;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.ssb.simplitend.patientprofile.medicalinfo.mvvm.MedicationInfo;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.FreqNMedTypeResult;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.ReminderResult;
|
||||
import com.ssb.simplitend.patientprofile.setuproutine.mvvm.RoutineDetails;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.ssb.simplitend.patientprofile;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -16,10 +15,9 @@ import androidx.navigation.Navigation;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.databinding.ProfileProgressFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ssb.simplitend.patientprofile.medicalinfo;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputFilter;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -13,6 +14,8 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.ProfileProgress;
|
||||
@@ -21,6 +24,7 @@ import com.ssb.simplitend.patientprofile.ProfileContracts;
|
||||
import com.ssb.simplitend.patientprofile.medicalinfo.mvvm.MedicalInfoViewModel;
|
||||
import com.ssb.simplitend.patientprofile.medicalinfo.mvvm.MedicationInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -39,6 +43,7 @@ public class AddMedicalInfoFragment extends Fragment implements
|
||||
|
||||
private MedicationInfo medicalInfo;
|
||||
public static final String MEDICAL_INFO_KEY = "medical_info";
|
||||
private ArrayList<String> countryCodeList;
|
||||
|
||||
public AddMedicalInfoFragment(){
|
||||
// required empty const.
|
||||
@@ -61,6 +66,72 @@ public class AddMedicalInfoFragment extends Fragment implements
|
||||
private void initViews() {
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
// populating country code list
|
||||
|
||||
countryCodeList = medicalInfoViewModel.loadCountryCodeDropDown(requireContext());
|
||||
|
||||
binding.countryCodes.setLifecycleOwner(this);
|
||||
|
||||
binding.countryCodes.setItems(countryCodeList);
|
||||
|
||||
if (!countryCodeList.contains("+1")){
|
||||
countryCodeList.add("+1");
|
||||
}
|
||||
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf("+1"));
|
||||
|
||||
binding.countryCodes.setDismissWhenNotifiedItemSelected(true);
|
||||
|
||||
binding.countryCodes.setIsFocusable(true);
|
||||
|
||||
// phone number formatting
|
||||
// to deal with input pasting in the edit text
|
||||
InputFilter phoneFilter = (charSequence, i, i1, spanned, i2, i3) -> {
|
||||
String phone_number_str = charSequence.toString();
|
||||
|
||||
String country_code = null;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() != -1){
|
||||
country_code = countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(charSequence, "US");
|
||||
|
||||
phone_number_str = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (country_code != null && !countryCodeList.contains(country_code)){
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
if (country_code != null){
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(country_code));
|
||||
}
|
||||
|
||||
if (phone_number_str.length() > 10){
|
||||
// pasted number length is greater than 10
|
||||
return phone_number_str.substring(0, 10);
|
||||
}
|
||||
|
||||
String total_phone_number = binding.phoneNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10){
|
||||
// max length should be 10
|
||||
return "";
|
||||
}else{
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
binding.phoneNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
|
||||
// arguments
|
||||
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle != null && bundle.getSerializable(MEDICAL_INFO_KEY) != null){
|
||||
@@ -75,7 +146,9 @@ public class AddMedicalInfoFragment extends Fragment implements
|
||||
|
||||
binding.diagnosis.setText(medicalInfo.diagnosis);
|
||||
binding.primaryDoc.setText(medicalInfo.primary_care_doctor);
|
||||
binding.docContact.setText(medicalInfo.doctor_phone_number);
|
||||
|
||||
binding.phoneNumber.setText(medicalInfo.doctor_phone_number);
|
||||
|
||||
binding.hospitalPref.setText(medicalInfo.hospital_preference);
|
||||
binding.allergies.setText(medicalInfo.allergies);
|
||||
binding.dietRestrict.setText(medicalInfo.diet_restriction);
|
||||
@@ -124,7 +197,18 @@ public class AddMedicalInfoFragment extends Fragment implements
|
||||
MediaType.parse("text/plain"));
|
||||
body.put("primary_care_doctor", primary_doc_body);
|
||||
|
||||
RequestBody doc_contact_body = RequestBody.create(binding.docContact.getText().toString().trim(),
|
||||
String phoneNumber = "";
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() == -1){
|
||||
phoneNumber += "+1";
|
||||
}else{
|
||||
phoneNumber += countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
phoneNumber += " ";
|
||||
phoneNumber += binding.phoneNumber.getText().toString();
|
||||
|
||||
RequestBody doc_contact_body = RequestBody.create(phoneNumber,
|
||||
MediaType.parse("text/plain"));
|
||||
body.put("doctor_phone_number", doc_contact_body);
|
||||
|
||||
@@ -180,10 +264,10 @@ public class AddMedicalInfoFragment extends Fragment implements
|
||||
binding.primaryDoc.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.docContact.getText().toString().trim().isEmpty()
|
||||
|| binding.docContact.getText().toString().trim().length() < 10){
|
||||
if (binding.phoneNumber.getText().toString().trim().isEmpty()
|
||||
|| binding.phoneNumber.getText().toString().trim().length() < 10){
|
||||
allOkay = false;
|
||||
binding.docContact.setError("Invalid");
|
||||
binding.phoneNumber.setError("Invalid");
|
||||
}
|
||||
|
||||
if (binding.hospitalPref.getText().toString().trim().isEmpty()){
|
||||
@@ -201,6 +285,11 @@ public class AddMedicalInfoFragment extends Fragment implements
|
||||
binding.dietRestrict.setError("Required");
|
||||
}
|
||||
|
||||
if (allOkay && binding.countryCodes.getSelectedIndex() == -1){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Select a country code", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
return allOkay;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
package com.ssb.simplitend.patientprofile.medicalinfo.mvvm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.patientprofile.ProfileContracts;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class MedicalInfoViewModel extends ViewModel {
|
||||
|
||||
private static final String TAG = "MedicalInfoViewModel";
|
||||
|
||||
private final MedicalIntoRepository medicalIntoRepository;
|
||||
|
||||
public MedicalInfoViewModel(){
|
||||
@@ -30,4 +44,60 @@ public class MedicalInfoViewModel extends ViewModel {
|
||||
medicalIntoRepository.getMedicalInfo(patient_id, token, medicationInfoCallback);
|
||||
}
|
||||
|
||||
public ArrayList<String> loadCountryCodeDropDown(Context context) {
|
||||
|
||||
ArrayList<String> countryCodeList = new ArrayList<>();
|
||||
|
||||
try {
|
||||
|
||||
String countryCodeStr = readCountryCodes(context);
|
||||
JSONArray jsonArray = new JSONArray(countryCodeStr);
|
||||
|
||||
for (int i = 0; i < jsonArray.length(); i++) {
|
||||
|
||||
JSONObject code = jsonArray.getJSONObject(i);
|
||||
|
||||
countryCodeList.add(code.getString("dial_code"));
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
// if cannot load all country codes showing only india's dial code
|
||||
countryCodeList.add("+91");
|
||||
countryCodeList.add("+1");
|
||||
|
||||
Log.e(TAG, "loadCountryCodeDropDown: ", e);
|
||||
}
|
||||
|
||||
return countryCodeList;
|
||||
}
|
||||
|
||||
public String readCountryCodes(Context context) throws IOException {
|
||||
StringBuilder returnString = new StringBuilder();
|
||||
|
||||
InputStream fIn = context.getResources().openRawResource(R.raw.country_code);
|
||||
InputStreamReader isr = new InputStreamReader(fIn);
|
||||
BufferedReader input = new BufferedReader(isr);
|
||||
|
||||
String line = "";
|
||||
|
||||
while ((line = input.readLine()) != null) {
|
||||
returnString.append(line);
|
||||
}
|
||||
|
||||
try {
|
||||
isr.close();
|
||||
|
||||
if (fIn != null) fIn.close();
|
||||
|
||||
input.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "readCountryCodes: ", e);
|
||||
}
|
||||
|
||||
return returnString.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import androidx.annotation.NonNull;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.patientprofile.PatientProfileAPIService;
|
||||
import com.ssb.simplitend.patientprofile.ProfileContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -92,7 +93,19 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
binding.getTime.setOnClickListener(v -> {
|
||||
binding.getTime.setError(null);
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
getTime();
|
||||
getTime(binding.getTime);
|
||||
});
|
||||
|
||||
binding.getTime2.setOnClickListener(v -> {
|
||||
binding.getTime.setError(null);
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
getTime(binding.getTime2);
|
||||
});
|
||||
|
||||
binding.getTime3.setOnClickListener(v -> {
|
||||
binding.getTime.setError(null);
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
getTime(binding.getTime3);
|
||||
});
|
||||
|
||||
binding.getDate.setOnClickListener(v -> {
|
||||
@@ -154,6 +167,18 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
// and saving the formatted time as text i.e. hh:mm a
|
||||
reminderResult.time1 = binding.getTime.getHint().toString();
|
||||
|
||||
if (binding.getTime2.getVisibility() == View.VISIBLE){
|
||||
reminderResult.time2 = binding.getTime2.getHint().toString();
|
||||
}else{
|
||||
reminderResult.time2 = null;
|
||||
}
|
||||
|
||||
if (binding.getTime3.getVisibility() == View.VISIBLE){
|
||||
reminderResult.time3 = binding.getTime3.getHint().toString();
|
||||
}else{
|
||||
reminderResult.time3 = null;
|
||||
}
|
||||
|
||||
reminderResult.medication_quantity = binding.quantity.getText().toString();
|
||||
reminderResult.medication_refill_date = binding.getDate.getText().toString();
|
||||
reminderResult.medication_instruction = binding.instructions.getText().toString().trim();
|
||||
@@ -217,6 +242,23 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
binding.frequencySpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, item) -> {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
binding.frequencySpinner.setError(null);
|
||||
|
||||
if (item != null){
|
||||
if (item.contains("1")){
|
||||
binding.getTime.setVisibility(View.VISIBLE);
|
||||
binding.getTime2.setVisibility(View.GONE);
|
||||
binding.getTime3.setVisibility(View.GONE);
|
||||
}else if (item.contains("2")){
|
||||
binding.getTime.setVisibility(View.VISIBLE);
|
||||
binding.getTime2.setVisibility(View.VISIBLE);
|
||||
binding.getTime3.setVisibility(View.GONE);
|
||||
}else if (item.contains("3")){
|
||||
binding.getTime.setVisibility(View.VISIBLE);
|
||||
binding.getTime2.setVisibility(View.VISIBLE);
|
||||
binding.getTime3.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
binding.medicationsSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, item) -> {
|
||||
@@ -261,6 +303,18 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
binding.getTime.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.getTime2.getVisibility() == View.VISIBLE &&
|
||||
binding.getTime2.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.getTime2.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.getTime3.getVisibility() == View.VISIBLE &&
|
||||
binding.getTime3.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.getTime3.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.quantity.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.quantity.setError("Required");
|
||||
@@ -305,18 +359,50 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
SimpleDateFormat input_sdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
|
||||
SimpleDateFormat output_sdf = new SimpleDateFormat("hh:mm a", Locale.getDefault());
|
||||
|
||||
String refill_time;
|
||||
String refill_time_1, refill_time_2 = null, refill_time_3 = null;
|
||||
|
||||
try {
|
||||
Date date = input_sdf.parse(reminder.time1);
|
||||
refill_time = output_sdf.format(date);
|
||||
if (date == null) throw new Exception();
|
||||
refill_time_1 = output_sdf.format(date);
|
||||
|
||||
if (reminder.time2 != null){
|
||||
binding.getTime2.setVisibility(View.VISIBLE);
|
||||
Date date2 = input_sdf.parse(reminder.time2);
|
||||
if (date2 == null) throw new Exception();
|
||||
refill_time_2 = output_sdf.format(date2);
|
||||
}else{
|
||||
binding.getTime2.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (reminder.time3 != null){
|
||||
binding.getTime3.setVisibility(View.VISIBLE);
|
||||
Date date3 = input_sdf.parse(reminder.time3);
|
||||
if (date3 == null) throw new Exception();
|
||||
refill_time_3 = output_sdf.format(date3);
|
||||
}else{
|
||||
binding.getTime3.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
refill_time = reminder.time1;
|
||||
refill_time_1 = reminder.time1;
|
||||
refill_time_2 = reminder.time2;
|
||||
refill_time_3 = reminder.time3;
|
||||
}
|
||||
|
||||
binding.getTime.setText(refill_time);
|
||||
binding.getTime.setText(refill_time_1);
|
||||
binding.getTime.setHint(reminder.time1);
|
||||
|
||||
if (reminder.time2 != null){
|
||||
binding.getTime2.setText(refill_time_2);
|
||||
binding.getTime2.setHint(reminder.time2);
|
||||
}
|
||||
|
||||
if (reminder.time3 != null){
|
||||
binding.getTime3.setText(refill_time_3);
|
||||
binding.getTime3.setHint(reminder.time3);
|
||||
}
|
||||
|
||||
for (int i = 0; i < frequencyList.size(); i++) {
|
||||
if (String.valueOf(frequencyList.get(i).id).equals(reminder.medication_frequency_xid)) {
|
||||
binding.frequencySpinner.selectItemByIndex(i);
|
||||
@@ -515,7 +601,8 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
}
|
||||
|
||||
// shows time picker to pick time and set to textview
|
||||
private void getTime() {
|
||||
private void getTime(TextView timeText) {
|
||||
timeText.setError(null);
|
||||
|
||||
Calendar calendar = Calendar.getInstance(Locale.getDefault());
|
||||
|
||||
@@ -530,8 +617,8 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
|
||||
|
||||
String selected_time = sdf.format(cal.getTime());
|
||||
binding.getTime.setText(selected_time);
|
||||
binding.getTime.setHint(sdf2.format(cal.getTime()));
|
||||
timeText.setText(selected_time);
|
||||
timeText.setHint(sdf2.format(cal.getTime()));
|
||||
|
||||
}, calendar.getTime().getHours(), calendar.getTime().getMinutes(), false);
|
||||
|
||||
@@ -562,6 +649,9 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
}
|
||||
binding.frequencySpinner.setItems(frequencies);
|
||||
|
||||
// default selection to one
|
||||
if (frequencies.size() > 1) binding.frequencySpinner.selectItemByIndex(0);
|
||||
|
||||
ArrayList<String> medicationTypes = new ArrayList<>();
|
||||
for (MedicationType type : medicationTypeList) {
|
||||
medicationTypes.add(type.title);
|
||||
|
||||
@@ -50,6 +50,8 @@ ReminderAdapter.ReminderCheckClickListener{
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
private ArrayList<ReminderResult> remindersList;
|
||||
|
||||
public ReminderFragment(){
|
||||
// required empty const.
|
||||
}
|
||||
@@ -132,7 +134,8 @@ ReminderAdapter.ReminderCheckClickListener{
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
binding.remindersRv.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
reminderAdapter = new ReminderAdapter();
|
||||
remindersList = new ArrayList<>();
|
||||
reminderAdapter = new ReminderAdapter(remindersList);
|
||||
reminderAdapter.setCheckClickListener(this);
|
||||
binding.remindersRv.setAdapter(reminderAdapter);
|
||||
|
||||
@@ -306,7 +309,7 @@ ReminderAdapter.ReminderCheckClickListener{
|
||||
binding.remindersRv.setVisibility(View.VISIBLE);
|
||||
binding.noData.setVisibility(View.GONE);
|
||||
|
||||
reminderAdapter.submitList(reminderResultList);
|
||||
reminderAdapter.submitLIst(reminderResultList);
|
||||
|
||||
}else{
|
||||
binding.remindersRv.setVisibility(View.GONE);
|
||||
@@ -361,7 +364,7 @@ ReminderAdapter.ReminderCheckClickListener{
|
||||
getString(R.string.yes), getString(R.string.no),
|
||||
v -> {
|
||||
// yes button clicked
|
||||
int patientReminderId = reminderAdapter.getCurrentList().get(position).id;
|
||||
int patientReminderId = reminderAdapter.getReminderResultList().get(position).id;
|
||||
String token = "Bearer " + AppUtil.getUserToken(requireContext());
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
@@ -382,7 +385,7 @@ ReminderAdapter.ReminderCheckClickListener{
|
||||
}else if (viewID == R.id.reminder_edit){
|
||||
Bundle bundle = new Bundle();
|
||||
|
||||
bundle.putSerializable(AddReminderFragment.REMINDER_KEY, reminderAdapter.getCurrentList().get(position));
|
||||
bundle.putSerializable(AddReminderFragment.REMINDER_KEY, reminderAdapter.getReminderResultList().get(position));
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_reminderFragment_to_addReminderFragment, bundle);
|
||||
|
||||
@@ -6,8 +6,6 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.ListAdapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
@@ -15,40 +13,38 @@ import com.ssb.simplitend.databinding.ReminderViewholderBinding;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.ReminderResult;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ReminderAdapter extends ListAdapter<ReminderResult, ReminderAdapter.ReminderViewHolder> {
|
||||
|
||||
private static final DiffUtil.ItemCallback<ReminderResult> DIFF_CALLBACK = new DiffUtil.ItemCallback<ReminderResult>() {
|
||||
@Override
|
||||
public boolean areItemsTheSame(@NonNull ReminderResult oldItem, @NonNull ReminderResult newItem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areContentsTheSame(@NonNull ReminderResult oldItem, @NonNull ReminderResult newItem) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
public class ReminderAdapter extends RecyclerView.Adapter<ReminderAdapter.ReminderViewHolder> {
|
||||
|
||||
private ReminderCheckClickListener checkClickListener;
|
||||
|
||||
// static thing for selection status
|
||||
public final boolean[] selection_state;
|
||||
|
||||
private volatile Date selected_date;
|
||||
|
||||
public ReminderAdapter(){
|
||||
super(DIFF_CALLBACK);
|
||||
this.selection_state = new boolean[2];
|
||||
private List<ReminderResult> reminderResultList;
|
||||
|
||||
public ReminderAdapter(ArrayList<ReminderResult> reminderResultList){
|
||||
this.reminderResultList = reminderResultList;
|
||||
}
|
||||
|
||||
public void setCheckClickListener(ReminderCheckClickListener checkClickListener) {
|
||||
this.checkClickListener = checkClickListener;
|
||||
}
|
||||
|
||||
public void submitLIst(List<ReminderResult> reminderResultList){
|
||||
this.reminderResultList = null;
|
||||
this.reminderResultList = reminderResultList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public List<ReminderResult> getReminderResultList() {
|
||||
return reminderResultList;
|
||||
}
|
||||
|
||||
public void setSelected_date(Date selected_date) {
|
||||
this.selected_date = selected_date;
|
||||
}
|
||||
@@ -61,29 +57,31 @@ public class ReminderAdapter extends ListAdapter<ReminderResult, ReminderAdapter
|
||||
@Override
|
||||
public ReminderViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ReminderViewholderBinding binding = ReminderViewholderBinding.inflate(LayoutInflater.from(parent.getContext()));
|
||||
return new ReminderViewHolder(binding, selection_state);
|
||||
return new ReminderViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ReminderViewHolder holder, int position) {
|
||||
holder.setReminder(getItem(position), position);
|
||||
holder.setReminder(reminderResultList.get(position), position);
|
||||
|
||||
holder.binding.done.setOnClickListener(v -> {
|
||||
if (checkClickListener != null) checkClickListener.onCheck(getItem(position), position);
|
||||
if (checkClickListener != null) checkClickListener.onCheck(reminderResultList.get(position), position);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return reminderResultList.size();
|
||||
}
|
||||
|
||||
public static class ReminderViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
public ReminderViewholderBinding binding;
|
||||
|
||||
private final boolean[] selection_state;
|
||||
|
||||
public ReminderViewHolder(ReminderViewholderBinding binding, boolean[] selection_state){
|
||||
public ReminderViewHolder(ReminderViewholderBinding binding){
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
this.selection_state = selection_state;
|
||||
}
|
||||
|
||||
public void setReminder(ReminderResult reminder, int position){
|
||||
@@ -161,7 +159,16 @@ public class ReminderAdapter extends ListAdapter<ReminderResult, ReminderAdapter
|
||||
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(itemView.getContext(), "Couldn't mark it done.", Toast.LENGTH_SHORT).show();
|
||||
// item selected. un-selecting now
|
||||
binding.sideBar.setBackgroundTintList(null);
|
||||
binding.card.setCardBackgroundColor(AppCompatResources.getColorStateList(itemView.getContext(), R.color.white_bg));
|
||||
binding.done.setImageResource(R.drawable.ic_done_accent);
|
||||
}
|
||||
}else{
|
||||
// item selected. un-selecting now
|
||||
binding.sideBar.setBackgroundTintList(null);
|
||||
binding.card.setCardBackgroundColor(AppCompatResources.getColorStateList(itemView.getContext(), R.color.white_bg));
|
||||
binding.done.setImageResource(R.drawable.ic_done_accent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.ssb.simplitend.patientprofile.PatientProfileAPIService;
|
||||
import com.ssb.simplitend.patientprofile.ProfileContracts;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.FreqNMedTypeResult;
|
||||
import com.ssb.simplitend.patientprofile.medreminder.mvvm.models.ReminderResult;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -174,7 +174,10 @@ public class RoutineAdapter extends ListAdapter<RoutineDetails, RoutineAdapter.R
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "setData: ", e);
|
||||
Toast.makeText(itemView.getContext(), "Couldn't mark it done.", Toast.LENGTH_SHORT).show();
|
||||
binding.check.setImageResource(R.drawable.ic_un_check);
|
||||
}
|
||||
}else{
|
||||
binding.check.setImageResource(R.drawable.ic_un_check);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,18 +5,13 @@ import androidx.annotation.NonNull;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.patientprofile.PatientProfileAPIService;
|
||||
import com.ssb.simplitend.patientprofile.ProfileContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Path;
|
||||
|
||||
public class RoutinesRepository {
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import com.ssb.simplitend.welcome.welcomecg.fragments.onboardfragemts.OnBoardOneFragment;
|
||||
import com.ssb.simplitend.welcome.welcomecg.fragments.onboardfragemts.OnBoardThreeFragment;
|
||||
import com.ssb.simplitend.welcome.welcomecg.fragments.onboardfragemts.OnBoardTwoFragment;
|
||||
|
||||
public class CgOnBoardAdapter extends FragmentStateAdapter {
|
||||
|
||||
public CgOnBoardAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) {
|
||||
super(fragmentManager, lifecycle);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
switch (position){
|
||||
case 2:
|
||||
return new OnBoardThreeFragment();
|
||||
case 1:
|
||||
return new OnBoardTwoFragment();
|
||||
default:
|
||||
return new OnBoardOneFragment();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgHowToSetUpFragmentBinding;
|
||||
|
||||
public class CgHowToSetUpFragment extends Fragment {
|
||||
|
||||
// view binding
|
||||
protected CgHowToSetUpFragmentBinding binding;
|
||||
|
||||
public CgHowToSetUpFragment(){
|
||||
// required empty const.
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgHowToSetUpFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.nextBtn.setOnClickListener(v -> Navigation.findNavController(v).navigate(R.id.action_howToSetUpFragment_to_registerFragment));
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgOnboardFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.CgOnBoardAdapter;
|
||||
|
||||
public class CgOnBoardFragment extends Fragment {
|
||||
|
||||
protected CgOnboardFragmentBinding binding;
|
||||
|
||||
public CgOnBoardFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgOnboardFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
|
||||
binding.nextBtn.setOnClickListener(v -> {
|
||||
int current_item = binding.viewPager.getCurrentItem();
|
||||
|
||||
if (current_item >= 0 && current_item < 2){
|
||||
binding.viewPager.setCurrentItem(current_item + 1, true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
binding.getsStarted.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgHowToSetUpFragment);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
// initiating view pager
|
||||
CgOnBoardAdapter adapter = new CgOnBoardAdapter(getChildFragmentManager(), getLifecycle());
|
||||
binding.viewPager.setAdapter(adapter);
|
||||
|
||||
binding.indicators.setViewPager(binding.viewPager);
|
||||
|
||||
binding.viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
|
||||
if (position == 2){
|
||||
binding.getsStarted.setVisibility(View.VISIBLE);
|
||||
binding.nextBtn.setVisibility(View.GONE);
|
||||
binding.skip.setVisibility(View.GONE);
|
||||
}else {
|
||||
binding.getsStarted.setVisibility(View.GONE);
|
||||
binding.nextBtn.setVisibility(View.VISIBLE);
|
||||
binding.skip.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String title, subtitle;
|
||||
|
||||
switch (position){
|
||||
case 2:
|
||||
title = getString(R.string.setup_a_geofence_to_protect_your_loved_one);
|
||||
subtitle = getString(R.string.be_notified_if_your_loved_one_ventures_too_far_from_home_or_a_designated_safe_area);
|
||||
break;
|
||||
case 1:
|
||||
title = getString(R.string.check_your_loved_one_s_medication_schedule);
|
||||
subtitle = getString(R.string.application_will_notify_you_when_it_is_time_for_your_loved_one_to_take_his_her_medication);
|
||||
break;
|
||||
default:
|
||||
title = getString(R.string.reinventing_connected_ncaregiving);
|
||||
subtitle = getString(R.string.you_are_always_connected_and_will_be_notified_when_your_loved_ones_need_you);
|
||||
break;
|
||||
}
|
||||
|
||||
binding.title.setText(title);
|
||||
binding.subTitle.setText(subtitle);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments.onboardfragemts;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgOnboardViewHolderBinding;
|
||||
|
||||
public class OnBoardOneFragment extends Fragment {
|
||||
|
||||
public OnBoardOneFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
CgOnboardViewHolderBinding binding = CgOnboardViewHolderBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.imageView.setImageResource(R.drawable.ic_cg_onboard_one);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments.onboardfragemts;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgOnboardViewHolderBinding;
|
||||
|
||||
public class OnBoardThreeFragment extends Fragment {
|
||||
|
||||
public OnBoardThreeFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
CgOnboardViewHolderBinding binding = CgOnboardViewHolderBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.imageView.setImageResource(R.drawable.ic_cg_onboard_three);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments.onboardfragemts;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgOnboardViewHolderBinding;
|
||||
|
||||
public class OnBoardTwoFragment extends Fragment {
|
||||
|
||||
public OnBoardTwoFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
CgOnboardViewHolderBinding binding = CgOnboardViewHolderBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.imageView.setImageResource(R.drawable.ic_cg_onboard_two);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -47,7 +47,10 @@ public class ChooseRoleFragment extends Fragment {
|
||||
Navigation.findNavController(v).navigate(R.id.action_chooseRoleFragment_to_signInSignUpFragment);
|
||||
});
|
||||
|
||||
binding.caregiverRole.setOnClickListener(v -> makeRoleSelection(CAREGIVER));
|
||||
binding.caregiverRole.setOnClickListener(v -> {
|
||||
makeRoleSelection(CAREGIVER);
|
||||
Navigation.findNavController(v).navigate(R.id.action_chooseRoleFragment_to_cgOnBoardFragment);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -6,9 +6,9 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import com.ssb.simplitend.welcome.fragments.onboardfragments.OnBoardOne;
|
||||
import com.ssb.simplitend.welcome.fragments.onboardfragments.OnBoardThree;
|
||||
import com.ssb.simplitend.welcome.fragments.onboardfragments.OnBoardTwo;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.onboardfragments.OnBoardOne;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.onboardfragments.OnBoardThree;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.onboardfragments.OnBoardTwo;
|
||||
|
||||
public class OnBoardPagerAdapter extends FragmentStateAdapter {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
@@ -22,9 +22,9 @@ import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.databinding.SignInFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientResult;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.ssb.simplitend.welcome.fragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -15,7 +13,7 @@ import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.WelcomeFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
|
||||
public class WelcomeFragment extends Fragment {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.ContactInfoFragment.CONTACT_DATA_KEY;
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
import static com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.ContactInfoFragment.CONTACT_DATA_KEY;
|
||||
import static com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
@@ -20,19 +20,18 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.databinding.AddContactFragmentBinding;
|
||||
import com.ssb.simplitend.databinding.DoneBottomsheetBinding;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.AddContactAdapter;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.AddContactAdapter;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AddContactFragment extends Fragment implements WelcomeContracts.ContactListContracts, AddContactAdapter.ContactClickListener{
|
||||
public class AddContactFragment extends Fragment implements WelcomeContracts.ContactListContracts, AddContactAdapter.ContactClickListener {
|
||||
|
||||
// view binding
|
||||
protected AddContactFragmentBinding binding;
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment.CONTACT_KEY;
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
import static com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.CreateContactFragment.CONTACT_KEY;
|
||||
import static com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
@@ -22,9 +22,9 @@ import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.ContactInfoFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
|
||||
public class ContactInfoFragment extends Fragment implements WelcomeContracts.DeleteContactInterface {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -10,7 +10,7 @@ import androidx.recyclerview.widget.ListAdapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.ssb.simplitend.databinding.ContactViewHolderBinding;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
|
||||
|
||||
public class ContactListAdapter extends ListAdapter<Contact, ContactListAdapter.ContactViewHolder> {
|
||||
|
||||
@@ -19,12 +19,12 @@ public class ContactListAdapter extends ListAdapter<Contact, ContactListAdapter.
|
||||
private static final DiffUtil.ItemCallback<Contact> DIFF_UTIL = new DiffUtil.ItemCallback<Contact>() {
|
||||
@Override
|
||||
public boolean areItemsTheSame(@NonNull Contact oldItem, @NonNull Contact newItem) {
|
||||
return oldItem.first_name.equals(newItem.first_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areContentsTheSame(@NonNull Contact oldItem, @NonNull Contact newItem) {
|
||||
return oldItem.equals(newItem);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts;
|
||||
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment.CONTACT_KEY;
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
@@ -30,9 +27,9 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.ContactListFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -86,8 +83,8 @@ public class ContactListFragment extends Fragment {
|
||||
contactListAdapter.setContactClickListener(contact ->
|
||||
{
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putBoolean(TO_EDIT_KEY, false);
|
||||
bundle.putSerializable(CONTACT_KEY, new ContactData(contact));
|
||||
bundle.putBoolean(CreateContactFragment.TO_EDIT_KEY, false);
|
||||
bundle.putSerializable(CreateContactFragment.CONTACT_KEY, new ContactData(contact));
|
||||
Navigation.findNavController(binding.getRoot()).navigate(R.id.action_contactListFragment_to_createContactFragment, bundle);
|
||||
}
|
||||
);
|
||||
@@ -189,7 +186,6 @@ public class ContactListFragment extends Fragment {
|
||||
}
|
||||
|
||||
contactViewModel = new ViewModelProvider(requireActivity()).get(ContactViewModel.class);
|
||||
Log.d(TAG, "initializeViews: viewmodel " + contactViewModel);
|
||||
|
||||
contactList = null;
|
||||
contactList = contactViewModel.getContactList(requireContext());
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
|
||||
import static com.ssb.simplitend.apputils.RetrofitHelper.CREATE_CONTACT;
|
||||
import static com.ssb.simplitend.apputils.RetrofitHelper.UPDATE_CONTACT;
|
||||
@@ -33,11 +33,11 @@ import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.CreateEditContactFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.ContactViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -117,6 +117,10 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
|
||||
binding.countryCodes.setItems(countryCodeList);
|
||||
|
||||
if (!countryCodeList.contains("+1")){
|
||||
countryCodeList.add("+1");
|
||||
}
|
||||
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf("+91"));
|
||||
|
||||
binding.countryCodes.setDismissWhenNotifiedItemSelected(true);
|
||||
@@ -125,6 +129,52 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
// phone number formatting
|
||||
// to deal with input pasting in the edit text
|
||||
InputFilter phoneFilter = (charSequence, i, i1, spanned, i2, i3) -> {
|
||||
String phone_number_str = charSequence.toString();
|
||||
|
||||
String country_code = null;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() != -1){
|
||||
country_code = countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(charSequence, "US");
|
||||
|
||||
phone_number_str = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (country_code != null && !countryCodeList.contains(country_code)){
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
if (country_code != null){
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(country_code));
|
||||
}
|
||||
|
||||
if (phone_number_str.length() > 10){
|
||||
// pasted number length is greater than 10
|
||||
return phone_number_str.substring(0, 10);
|
||||
}
|
||||
|
||||
String total_phone_number = binding.phoneNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10){
|
||||
// max length should be 10
|
||||
return "";
|
||||
}else{
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
binding.phoneNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle != null) {
|
||||
@@ -175,52 +225,6 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
Toast.makeText(requireContext(), "Task Cancelled", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
// phone number formatting
|
||||
// to deal with input pasting in the edit text
|
||||
InputFilter phoneFilter = (charSequence, i, i1, spanned, i2, i3) -> {
|
||||
String phone_number_str = charSequence.toString();
|
||||
|
||||
String country_code = null;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() != -1){
|
||||
country_code = countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(charSequence, "US");
|
||||
|
||||
phone_number_str = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (country_code != null && !countryCodeList.contains(country_code)){
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
if (country_code != null){
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(country_code));
|
||||
}
|
||||
|
||||
if (phone_number_str.length() > 10){
|
||||
// pasted number length is greater than 10
|
||||
return phone_number_str.substring(0, 10);
|
||||
}
|
||||
|
||||
String total_phone_number = binding.phoneNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10){
|
||||
// max length should be 10
|
||||
return "";
|
||||
}else{
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
binding.phoneNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
@@ -499,33 +503,10 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
if (contactData.first_name != null)
|
||||
binding.name.setText(contactData.first_name);
|
||||
|
||||
String[] code_phone = contactData.phone_number.split(" ");
|
||||
|
||||
if (code_phone.length > 1) {
|
||||
// there is a country code
|
||||
int index = countryCodeList.indexOf(code_phone[0]);
|
||||
|
||||
int i;
|
||||
|
||||
if (index >= 0) {
|
||||
// country code exits
|
||||
binding.countryCodes.selectItemByIndex(index);
|
||||
i = 1;
|
||||
} else {
|
||||
// country code doesn't exits
|
||||
i = 0;
|
||||
binding.countryCodes.clearSelectedItem();
|
||||
}
|
||||
|
||||
contactData.phone_number = "";
|
||||
for (; i < code_phone.length; i++) {
|
||||
contactData.phone_number = contactData.phone_number.concat(code_phone[i]);
|
||||
}
|
||||
} else {
|
||||
binding.countryCodes.clearSelectedItem();
|
||||
}
|
||||
|
||||
binding.phoneNumber.setText(contactData.phone_number);
|
||||
if (contactData.country_code != null && countryCodeList.contains(contactData.country_code)){
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(contactData.country_code));
|
||||
}
|
||||
|
||||
if (contactData.email_address != null)
|
||||
binding.email.setText(contactData.email_address);
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm;
|
||||
|
||||
import static com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
import static com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.CreateContactFragment.TO_EDIT_KEY;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.os.Bundle;
|
||||
@@ -17,7 +17,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.AddContactViewholderBinding;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactData;
|
||||
|
||||
public class AddContactAdapter extends ListAdapter<ContactData, AddContactAdapter.ContactViewHolder> {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
@@ -9,6 +11,9 @@ public class Contact implements Serializable {
|
||||
|
||||
public String is_sos, updated_at, created_at;
|
||||
|
||||
@Nullable
|
||||
public String country_code;
|
||||
|
||||
public long id;
|
||||
|
||||
public Contact(){}
|
||||
@@ -32,19 +37,6 @@ public class Contact implements Serializable {
|
||||
this.created_at = created_at;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Contact contact = (Contact) o;
|
||||
return first_name.equals(contact.first_name) && Objects.equals(imageUri, contact.imageUri) && phone_number.equals(contact.phone_number) && Objects.equals(relationship, contact.relationship) && Objects.equals(email_address, contact.email_address);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(first_name, imageUri, phone_number, relationship, email_address);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Contact{" +
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
@@ -13,7 +13,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.DecisionBottomsheetBinding;
|
||||
import com.ssb.simplitend.databinding.DoneBottomsheetBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
@@ -27,7 +27,6 @@ import java.util.Map;
|
||||
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
public class ContactViewModel extends AndroidViewModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -9,11 +9,13 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeApiService;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeApiService;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
@@ -175,27 +177,36 @@ public class UserContactRepository {
|
||||
if (cursor != null) {
|
||||
|
||||
// To avoid duplicate phone numbers
|
||||
HashSet<String> mobileNoSet = new HashSet<String>();
|
||||
HashSet<String> mobileNoSet = new HashSet<>();
|
||||
|
||||
try {
|
||||
final int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);
|
||||
final int numberIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
|
||||
|
||||
Log.d("aditya", "getContactList: " + cursor.getColumnCount());
|
||||
|
||||
String name, number, photoUri;
|
||||
String name, number, country_code = null;
|
||||
while (cursor.moveToNext()) {
|
||||
name = cursor.getString(nameIndex);
|
||||
number = cursor.getString(numberIndex);
|
||||
|
||||
Log.d(TAG, "getContactList: " + number);
|
||||
|
||||
if (!mobileNoSet.contains(number)) {
|
||||
number = PhoneNumberUtils.formatNumber(number, Locale.getDefault().getCountry());
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(number, "US");
|
||||
|
||||
number = number.replace("-", "");
|
||||
number = number.replace("(", "");
|
||||
number = number.replace(")", "");
|
||||
number = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
number = number.replace("-", "");
|
||||
number = number.replace("(", "");
|
||||
number = number.replace(")", "");
|
||||
}
|
||||
|
||||
contactList.add(new Contact(name, number));
|
||||
Contact contact = new Contact(name, number);
|
||||
contact.country_code = country_code;
|
||||
|
||||
contactList.add(contact);
|
||||
mobileNoSet.add(number);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
@@ -17,6 +17,8 @@ public class ContactData implements Serializable {
|
||||
public String contact_photo;
|
||||
public CareGiverData care_giver_data;
|
||||
|
||||
public String country_code;
|
||||
|
||||
public int contact_id;
|
||||
|
||||
public ContactData() {
|
||||
@@ -25,6 +27,7 @@ public class ContactData implements Serializable {
|
||||
public ContactData(Contact contact){
|
||||
this.first_name = contact.first_name;
|
||||
this.phone_number = contact.phone_number;
|
||||
this.country_code = contact.country_code;
|
||||
}
|
||||
|
||||
public ContactData(int id) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.contacts.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.forgotpin;
|
||||
|
||||
import static com.ssb.simplitend.welcome.fragments.forgotpin.ForgotPinFragment.EMAIL_KEY;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.forgotpin;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
@@ -22,9 +20,9 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.databinding.ChangePinFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -70,13 +68,13 @@ public class ChangePinFragment extends Fragment implements WelcomeContracts.Upda
|
||||
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle == null || bundle.getString(EMAIL_KEY) == null){
|
||||
if (bundle == null || bundle.getString(ForgotPinFragment.EMAIL_KEY) == null){
|
||||
Toast.makeText(requireContext(), "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
return;
|
||||
}
|
||||
|
||||
email_id = bundle.getString(EMAIL_KEY);
|
||||
email_id = bundle.getString(ForgotPinFragment.EMAIL_KEY);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.forgotpin;
|
||||
|
||||
import static com.ssb.simplitend.welcome.fragments.forgotpin.ForgotPinFragment.EMAIL_KEY;
|
||||
import static com.ssb.simplitend.welcome.fragments.forgotpin.ForgotPinFragment.USER_ID_KEY;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.forgotpin;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
@@ -22,9 +19,9 @@ import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.CheckMailFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.OTPSentResponse;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -69,16 +66,16 @@ public class CheckMailFragment extends Fragment implements WelcomeContracts.Veri
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle == null || bundle.getString(USER_ID_KEY) == null || bundle.getString(EMAIL_KEY) == null) {
|
||||
if (bundle == null || bundle.getString(ForgotPinFragment.USER_ID_KEY) == null || bundle.getString(ForgotPinFragment.EMAIL_KEY) == null) {
|
||||
Toast.makeText(requireContext(), "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
return;
|
||||
}
|
||||
|
||||
user_id = bundle.getString(USER_ID_KEY);
|
||||
email_id = bundle.getString(EMAIL_KEY);
|
||||
user_id = bundle.getString(ForgotPinFragment.USER_ID_KEY);
|
||||
email_id = bundle.getString(ForgotPinFragment.EMAIL_KEY);
|
||||
try {
|
||||
binding.email.setText(encodeEmail(bundle.getString(EMAIL_KEY)));
|
||||
binding.email.setText(encodeEmail(bundle.getString(ForgotPinFragment.EMAIL_KEY)));
|
||||
}catch (Exception e){
|
||||
binding.email.setText(email_id);
|
||||
}
|
||||
@@ -302,7 +299,7 @@ public class CheckMailFragment extends Fragment implements WelcomeContracts.Veri
|
||||
Toast.makeText(requireContext(), "OTP verified successfully", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EMAIL_KEY, email_id);
|
||||
bundle.putString(ForgotPinFragment.EMAIL_KEY, email_id);
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_checkMailFragment_to_changePinFragment, bundle);
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.forgotpin;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.forgotpin;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
@@ -18,9 +18,9 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.databinding.ForgotPinFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.OTPSentResponse;
|
||||
|
||||
public class ForgotPinFragment extends Fragment implements WelcomeContracts.SendOTPToEmailCallback {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.onboardfragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.onboardfragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.onboardfragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.onboardfragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.onboardfragments;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.onboardfragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.register;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
@@ -18,12 +18,11 @@ import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.databinding.CreatePinFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientResult;
|
||||
|
||||
public class CreatePinFragment extends Fragment implements WelcomeContracts.RegisterPatientContract {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.register;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.register;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import static android.content.Context.LOCATION_SERVICE;
|
||||
|
||||
@@ -10,17 +10,14 @@ import android.content.Intent;
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Settings;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
@@ -52,8 +49,8 @@ import com.skydoves.powerspinner.OnSpinnerItemSelectedListener;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.LocationFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
@@ -182,10 +179,30 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
binding.town.setOnEditorActionListener((textView, i, keyEvent) -> {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
binding.town.clearFocus();
|
||||
binding.countrySpinner.show();
|
||||
binding.stateSpinner.show();
|
||||
return true;
|
||||
});
|
||||
|
||||
binding.zipCode.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (editable.toString().length() == 6){
|
||||
binding.zipCode.clearFocus();
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// load data from watcher
|
||||
@@ -522,7 +539,12 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
binding.stateSpinner.clearSelectedItem();
|
||||
}
|
||||
|
||||
binding.stateSpinner.requestFocus();
|
||||
binding.street.requestFocus();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().getWindow()
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
binding.stateSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.register;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.ProgressDialog;
|
||||
@@ -28,9 +28,9 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.databinding.RegisterFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -95,18 +95,22 @@ public class RegisterFragment extends Fragment implements WelcomeContracts.Verif
|
||||
|
||||
binding.countryCodes.setItems(countryCodeList);
|
||||
|
||||
if (!countryCodeList.contains("+1")){
|
||||
countryCodeList.add("+1");
|
||||
}
|
||||
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf("+1"));
|
||||
|
||||
binding.countryCodes.setDismissWhenNotifiedItemSelected(true);
|
||||
|
||||
binding.countryCodes.setIsFocusable(true);
|
||||
|
||||
setErrorRemovers();
|
||||
|
||||
loadPatientDataSavedState();
|
||||
|
||||
setFocusManager();
|
||||
|
||||
setErrorRemovers();
|
||||
|
||||
}
|
||||
|
||||
private void setFocusManager() {
|
||||
@@ -135,7 +139,7 @@ public class RegisterFragment extends Fragment implements WelcomeContracts.Verif
|
||||
|
||||
String country_code;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() == -2){
|
||||
if (binding.countryCodes.getSelectedIndex() == -1){
|
||||
country_code = "+1";
|
||||
}else{
|
||||
country_code = countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
@@ -184,11 +188,7 @@ public class RegisterFragment extends Fragment implements WelcomeContracts.Verif
|
||||
binding.dob.setText(patientData.date_of_birth);
|
||||
|
||||
if (patientData.phone_number != null) {
|
||||
String[] contact = patientData.phone_number.split(" ");
|
||||
if (contact.length == 2) {
|
||||
binding.contactNumber.setText(contact[1]);
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(contact[0]));
|
||||
}
|
||||
binding.contactNumber.setText(patientData.phone_number);
|
||||
}
|
||||
|
||||
binding.email.setText(patientData.email);
|
||||
@@ -253,6 +253,9 @@ public class RegisterFragment extends Fragment implements WelcomeContracts.Verif
|
||||
try {
|
||||
Date selected_date = sdf.parse(binding.dob.getText().toString().trim());
|
||||
Calendar selected_calender = Calendar.getInstance();
|
||||
|
||||
if (selected_date == null) throw new Exception();
|
||||
|
||||
selected_calender.setTime(selected_date);
|
||||
|
||||
Calendar minAdultAge = Calendar.getInstance();
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.register;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.fragments.register;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -43,7 +43,6 @@ public class ThankYouFragment extends Fragment {
|
||||
Glide.with(requireContext())
|
||||
.asGif()
|
||||
.load(R.raw.done_anim)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.into(binding.animIv);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package com.ssb.simplitend.welcome.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientResult;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.ssb.simplitend.welcome.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm;
|
||||
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm;
|
||||
|
||||
import static com.ssb.simplitend.apputils.RetrofitHelper.getRetrofit;
|
||||
|
||||
@@ -6,10 +6,10 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.ssb.simplitend.welcome.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.OTPSentResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientResult;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.mvvm;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
@@ -7,7 +7,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.welcome.mvvm.models.PatientData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm.models;
|
||||
|
||||
// base class for response
|
||||
public class CallResponse<T> {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm.models;
|
||||
|
||||
public class OTPSentResponse{
|
||||
public int id;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm.models;
|
||||
|
||||
public class PatientData {
|
||||
// fields
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.welcome.mvvm.models;
|
||||
package com.ssb.simplitend.welcome.welcomepatient.mvvm.models;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
BIN
app/src/main/res/drawable/ic_cg_onboard_one.png
Normal file
BIN
app/src/main/res/drawable/ic_cg_onboard_one.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 193 KiB |
BIN
app/src/main/res/drawable/ic_cg_onboard_three.png
Normal file
BIN
app/src/main/res/drawable/ic_cg_onboard_three.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
app/src/main/res/drawable/ic_cg_onboard_two.png
Normal file
BIN
app/src/main/res/drawable/ic_cg_onboard_two.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 175 KiB |
@@ -1,5 +1,11 @@
|
||||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:tint="#000000" android:viewportHeight="24"
|
||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="#ffffff"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z" />
|
||||
</vector>
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
<size android:height="30dp"
|
||||
android:width="30dp"/>
|
||||
|
||||
|
||||
</shape>
|
||||
@@ -120,32 +120,87 @@
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/doc_contact"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_contact_number"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
android:drawableStart="@drawable/ic_doc_contact"
|
||||
android:drawablePadding="10dp"
|
||||
>
|
||||
|
||||
android:maxLength="10"
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/phone_number"
|
||||
|
||||
android:autofillHints="phone"
|
||||
android:inputType="phone"
|
||||
android:maxLines="1"
|
||||
tools:ignore="LabelFor" />
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
android:src="@drawable/ic_doc_contact"
|
||||
android:layout_marginVertical="10dp"/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_codes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14.5sp"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginVertical="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
android:hint="@string/phone_number"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:autofillHints="phone"
|
||||
android:inputType="number"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -516,6 +516,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_time"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -538,6 +539,56 @@
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_clock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_time_2"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:hint="@string/enter_time_2"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_clock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_time_3"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:hint="@string/enter_time_3"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_clock" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
363
app/src/main/res/layout/cg_how_to_set_up_fragment.xml
Normal file
363
app/src/main/res/layout/cg_how_to_set_up_fragment.xml
Normal file
@@ -0,0 +1,363 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_above="@id/next_btn"
|
||||
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/how_to_setup"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineMedium"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/_1"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="#005F9A"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_setup_bg"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_accent"
|
||||
android:contentDescription="@string/how_to_setup"
|
||||
|
||||
android:layout_marginVertical="@dimen/_17sdp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/create_your_account"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/enter_your_basic_details_like_name_number_email_address_pin"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textSize="15sp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/_2"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="#005F9A"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_setup_bg"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="50dp"
|
||||
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:contentDescription="@string/how_to_setup"
|
||||
|
||||
android:layout_marginVertical="@dimen/_17sdp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/accept_invitation"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/accept_your_loved_one_s_invitation_to_connect"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textSize="15sp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/_3"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="#005F9A"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_setup_bg"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_accent"
|
||||
android:contentDescription="@string/how_to_setup"
|
||||
|
||||
android:layout_marginVertical="@dimen/_17sdp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/subscribe"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/complete_application_subscription"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textSize="15sp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/_4"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="#005F9A"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_setup_bg"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/you_are_ready"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/your_phone_is_linked_to_your_loved_one"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textSize="15sp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/next_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:backgroundTint="@color/color_primary"
|
||||
|
||||
android:layout_marginVertical="15dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:text="@string/next"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
app:cornerRadius="10dp"
|
||||
|
||||
android:drawableEnd="@drawable/ic_forward_error"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
132
app/src/main/res/layout/cg_onboard_fragment.xml
Normal file
132
app/src/main/res/layout/cg_onboard_fragment.xml
Normal file
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="vertical"
|
||||
android:weightSum="10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="6"/>
|
||||
|
||||
<me.relex.circleindicator.CircleIndicator3
|
||||
android:id="@+id/indicators"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.5"
|
||||
|
||||
app:ci_gravity="center"
|
||||
|
||||
app:ci_drawable="@drawable/selected_dot_primary"
|
||||
app:ci_drawable_unselected="@drawable/unselected_dot_accent"
|
||||
|
||||
app:ci_width="@dimen/_6sdp"
|
||||
app:ci_height="@dimen/_6sdp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2.5"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/reinventing_connected_ncaregiving"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_20ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/be_notified_if_your_loved_one_ventures_too_far_from_home_or_a_designated_safe_area"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/skip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/skip"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:layout_margin="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/next_btn"
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
app:civ_circle_background_color="@color/color_primary"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
|
||||
android:layout_margin="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/gets_started"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:text="@string/get_started"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/white_bg"
|
||||
|
||||
android:visibility="visible"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
app:cornerRadius="10dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
15
app/src/main/res/layout/cg_onboard_view_holder.xml
Normal file
15
app/src/main/res/layout/cg_onboard_view_holder.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -116,55 +116,6 @@
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/street"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_street"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
tools:text="Aditya"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/town"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_town"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -228,6 +179,55 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/street"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_street"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
tools:text="Aditya"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/town"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_town"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
|
||||
app:ci_width="@dimen/_6sdp"
|
||||
app:ci_height="@dimen/_6sdp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<fragment
|
||||
android:id="@+id/welcomeFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.WelcomeFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.WelcomeFragment"
|
||||
android:label="WelcomeFragment" >
|
||||
<action
|
||||
android:id="@+id/action_welcomeFragment_to_chooseRoleFragment"
|
||||
@@ -14,15 +14,18 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/chooseRoleFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.ChooseRoleFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.ChooseRoleFragment"
|
||||
android:label="ChooseRoleFragment" >
|
||||
<action
|
||||
android:id="@+id/action_chooseRoleFragment_to_signInSignUpFragment"
|
||||
app:destination="@id/signInSignUpFragment" />
|
||||
<action
|
||||
android:id="@+id/action_chooseRoleFragment_to_cgOnBoardFragment"
|
||||
app:destination="@id/cgOnBoardFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/signInSignUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.SignInSignUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.SignInSignUpFragment"
|
||||
android:label="SignInSignUpFragment" >
|
||||
<action
|
||||
android:id="@+id/action_signInSignUpFragment_to_signInFragment"
|
||||
@@ -33,7 +36,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/signInFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.SignInFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.SignInFragment"
|
||||
android:label="SignInFragment" >
|
||||
<action
|
||||
android:id="@+id/action_signInFragment_to_forgotPinFragment"
|
||||
@@ -41,7 +44,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/forgotPinFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.forgotpin.ForgotPinFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.forgotpin.ForgotPinFragment"
|
||||
android:label="ForgotPinFragment" >
|
||||
<action
|
||||
android:id="@+id/action_forgotPinFragment_to_checkMailFragment"
|
||||
@@ -49,7 +52,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/checkMailFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.forgotpin.CheckMailFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.forgotpin.CheckMailFragment"
|
||||
android:label="CheckMailFragment" >
|
||||
<action
|
||||
android:id="@+id/action_checkMailFragment_to_changePinFragment"
|
||||
@@ -57,11 +60,11 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/changePinFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.forgotpin.ChangePinFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.forgotpin.ChangePinFragment"
|
||||
android:label="ChangePinFragment" />
|
||||
<fragment
|
||||
android:id="@+id/registerFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.register.RegisterFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.register.RegisterFragment"
|
||||
android:label="RegisterFragment" >
|
||||
<action
|
||||
android:id="@+id/action_registerFragment_to_locationFragment"
|
||||
@@ -69,7 +72,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/locationFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.register.LocationFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.register.LocationFragment"
|
||||
android:label="LocationFragment" >
|
||||
<action
|
||||
android:id="@+id/action_locationFragment_to_createPinFragment"
|
||||
@@ -77,7 +80,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/createPinFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.register.CreatePinFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.register.CreatePinFragment"
|
||||
android:label="CreatePinFragment" >
|
||||
<action
|
||||
android:id="@+id/action_createPinFragment_to_thankYouFragment"
|
||||
@@ -88,7 +91,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/thankYouFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.register.ThankYouFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.register.ThankYouFragment"
|
||||
android:label="ThankYouFragment" >
|
||||
<action
|
||||
android:id="@+id/action_thankYouFragment_to_contactListFragment"
|
||||
@@ -96,7 +99,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/contactListFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.contacts.ContactListFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.ContactListFragment"
|
||||
android:label="ContactListFragment" >
|
||||
<action
|
||||
android:id="@+id/action_contactListFragment_to_createContactFragment"
|
||||
@@ -104,7 +107,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/createContactFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.contacts.CreateContactFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.CreateContactFragment"
|
||||
android:label="CreateContactFragment" >
|
||||
<action
|
||||
android:id="@+id/action_createContactFragment_to_addContactFragment"
|
||||
@@ -115,7 +118,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/addContactFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.contacts.AddContactFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.AddContactFragment"
|
||||
android:label="AddContactFragment">
|
||||
<action
|
||||
android:id="@+id/action_addContactFragment_to_contactInfoFragment"
|
||||
@@ -137,7 +140,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/contactInfoFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.contacts.ContactInfoFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.ContactInfoFragment"
|
||||
android:label="ContactInfoFragment"
|
||||
>
|
||||
<action
|
||||
@@ -146,7 +149,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/howToSetUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.register.HowToSetUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.register.HowToSetUpFragment"
|
||||
android:label="HowToSetUpFragment" >
|
||||
<action
|
||||
android:id="@+id/action_howToSetUpFragment_to_registerFragment"
|
||||
@@ -187,7 +190,7 @@
|
||||
android:label="AddReminderFragment" />
|
||||
<fragment
|
||||
android:id="@+id/splashFragment"
|
||||
android:name="com.ssb.simplitend.welcome.fragments.register.SplashFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomepatient.fragments.register.SplashFragment"
|
||||
android:label="SplashFragment" >
|
||||
<action
|
||||
android:id="@+id/action_splashFragment_to_welcomeFragment"
|
||||
@@ -221,4 +224,16 @@
|
||||
android:id="@+id/registerCompleteFragment"
|
||||
android:name="com.ssb.simplitend.patientprofile.RegisterCompleteFragment"
|
||||
android:label="RegisterCompleteFragment" />
|
||||
<fragment
|
||||
android:id="@+id/cgOnBoardFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgOnBoardFragment"
|
||||
android:label="CgOnBoardFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgOnBoardFragment_to_cgHowToSetUpFragment"
|
||||
app:destination="@id/cgHowToSetUpFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgHowToSetUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgHowToSetUpFragment"
|
||||
android:label="CgHowToSetUpFragment" />
|
||||
</navigation>
|
||||
@@ -160,7 +160,9 @@
|
||||
<string name="t">T</string>
|
||||
<string name="f">F</string>
|
||||
<string name="w">W</string>
|
||||
<string name="enter_time">Enter time</string>
|
||||
<string name="enter_time">Enter time 1</string>
|
||||
<string name="enter_time_2">Enter time 2</string>
|
||||
<string name="enter_time_3">Enter time 3</string>
|
||||
<string name="quantity">Quantity</string>
|
||||
<string name="enter_quantity">Enter quantity</string>
|
||||
<string name="refill_date">Refill date</string>
|
||||
@@ -191,8 +193,8 @@
|
||||
<string name="add_medical_information">Add medical information</string>
|
||||
<string name="edit_medical_information">Edit medical information</string>
|
||||
<string name="enter_diagnosis">Enter diagnosis</string>
|
||||
<string name="enter_primary_doctor_number">Enter primary doctor number</string>
|
||||
<string name="enter_contact_number">Enter contact number</string>
|
||||
<string name="enter_primary_doctor_number">Enter primary doctor</string>
|
||||
<string name="enter_contact_number">Enter contact</string>
|
||||
<string name="enter_hospital_preference">Enter hospital preference</string>
|
||||
<string name="enter_allergies">Enter allergies</string>
|
||||
<string name="enter_diet_restriction">Enter diet restriction</string>
|
||||
@@ -246,5 +248,21 @@
|
||||
<string name="your_profile_is_100_complete">Your profile is 100% complete!</string>
|
||||
<string name="sync_with_caregiver_app_to_proceed">Sync with Caregiver App to proceed.</string>
|
||||
<string name="your_setup_is_in_proceed">Your setup is in proceed</string>
|
||||
<string name="reinventing_connected_ncaregiving">Reinventing connected\nCaregiving</string>
|
||||
<string name="check_your_loved_one_s_medication_schedule">Check your loved one’s medication schedule.</string>
|
||||
<string name="setup_a_geofence_to_protect_your_loved_one">Setup a geofence to\nprotect your loved one.</string>
|
||||
<string name="you_are_always_connected_and_will_be_notified_when_your_loved_ones_need_you">You are always connected and will be notified when your loved ones need you.</string>
|
||||
<string name="application_will_notify_you_when_it_is_time_for_your_loved_one_to_take_his_her_medication">Application will notify you when it is time for your loved one to take his/her medication.</string>
|
||||
<string name="be_notified_if_your_loved_one_ventures_too_far_from_home_or_a_designated_safe_area">Be notified if your loved one ventures too far from home or a designated safe area</string>
|
||||
<string name="skip">Skip</string>
|
||||
<string name="get_started">Get started</string>
|
||||
<string name="create_your_account">Create your account</string>
|
||||
<string name="enter_your_basic_details_like_name_number_email_address_pin"><![CDATA[Enter your basic details like Name, Number, Email, Address & Pin]]></string>
|
||||
<string name="accept_invitation">Accept invitation</string>
|
||||
<string name="accept_your_loved_one_s_invitation_to_connect">Accept your loved one\'s invitation to connect</string>
|
||||
<string name="subscribe">Subscribe !</string>
|
||||
<string name="complete_application_subscription">Complete application subscription</string>
|
||||
<string name="you_are_ready">You are ready!</string>
|
||||
<string name="your_phone_is_linked_to_your_loved_one">Your phone is linked to your loved one.</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user