.
This commit is contained in:
4
.idea/deploymentTargetDropDown.xml
generated
4
.idea/deploymentTargetDropDown.xml
generated
@@ -7,12 +7,12 @@
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="5203ae2be8ec4353" />
|
||||
<value value="RZCW41EJRPN" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-08-17T15:48:04.859158700Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2023-08-18T14:20:11.935271800Z" />
|
||||
<runningDeviceTargetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
|
||||
@@ -18,18 +18,26 @@
|
||||
android:theme="@style/Theme.SimpliTend"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".caregiverdashboard.PatientProfileShowerActivity"
|
||||
android:exported="false" />
|
||||
android:name=".caregiverdashboard.activities.PatientProfileShowerActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name=".caregiverdashboard.activities.PatientProfileInfoActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".caregiverdashboard.CgProfileProgressActivity"
|
||||
android:exported="true">
|
||||
|
||||
|
||||
android:name=".caregiverdashboard.activities.CgProfileProgressActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
>
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".cg_geofencing.CgGeoFencingActivity"
|
||||
android:exported="true"></activity>
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
/>
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.geo.API_KEY"
|
||||
@@ -39,7 +47,7 @@
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<activity
|
||||
android:name=".caregiverdashboard.CaregiverDashActivity"
|
||||
android:name=".caregiverdashboard.activities.CaregiverDashActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
|
||||
@@ -20,6 +20,15 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.DecisionBottomsheetBinding;
|
||||
import com.ssb.simplitend.databinding.DoneBottomsheetBinding;
|
||||
|
||||
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;
|
||||
|
||||
public abstract class AppUtil {
|
||||
|
||||
private static final String TAG = "AppUtil";
|
||||
@@ -133,6 +142,65 @@ public abstract class AppUtil {
|
||||
alertBuilder.create().show(); // Showing alert dialog
|
||||
}
|
||||
|
||||
// fetches the country codes from the JSON file in raw directory
|
||||
public static 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 static 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();
|
||||
}
|
||||
|
||||
|
||||
// user data utils
|
||||
public static void savePatientData(String token, int patient_uid, Context context, boolean isLoggedIn){
|
||||
SharedPreferences sp = context.getSharedPreferences(PATIENT_DETAILS, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
|
||||
@@ -23,24 +23,26 @@ public abstract class CaregiverDataCache {
|
||||
}
|
||||
|
||||
public static void getCaregiverData(Context context,
|
||||
@NonNull GetCaregiverDataCallBack callBack){
|
||||
@NonNull GetCaregiverDataCallBack callBack,
|
||||
boolean show_progress){
|
||||
if (careGiverData != null && careGiverData.patientDetails != null){
|
||||
callBack.careGiverData(careGiverData);
|
||||
return;
|
||||
}
|
||||
|
||||
updateCaregiverData(context, callBack);
|
||||
updateCaregiverData(context, callBack, show_progress);
|
||||
}
|
||||
|
||||
private static void updateCaregiverData(Context context,
|
||||
@Nullable GetCaregiverDataCallBack callBack) {
|
||||
@Nullable GetCaregiverDataCallBack callBack,
|
||||
boolean show_progress) {
|
||||
WelcomeApiService apiService = RetrofitHelper.getRetrofit().create(WelcomeApiService.class);
|
||||
|
||||
ProgressDialog progressDialog = new ProgressDialog(context);
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we fetch details for you...");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
if (show_progress) progressDialog.show();
|
||||
|
||||
apiService.getCgUserData("Bearer " + AppUtil.getCgToken(context))
|
||||
.enqueue(new Callback<CallResponse<CareGiverData>>() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.caregiverdashboard;
|
||||
package com.ssb.simplitend.caregiverdashboard.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -47,7 +47,7 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
this.careGiverData = careGiverData;
|
||||
|
||||
watchSubscription();
|
||||
});
|
||||
}, true);
|
||||
|
||||
initViews();
|
||||
|
||||
@@ -1,17 +1,31 @@
|
||||
package com.ssb.simplitend.caregiverdashboard;
|
||||
package com.ssb.simplitend.caregiverdashboard.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.vectordrawable.graphics.drawable.Animatable2Compat;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.load.resource.gif.GifDrawable;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.daimajia.androidanimations.library.Techniques;
|
||||
import com.daimajia.androidanimations.library.YoYo;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.cg_geofencing.CgGeoFencingActivity;
|
||||
import com.ssb.simplitend.databinding.ActivityCgProfileProgressBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.fragments.CgAuthActivity;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
|
||||
import static com.ssb.simplitend.caregiverdashboard.PatientProfileShowerActivity.*;
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.*;
|
||||
|
||||
public class CgProfileProgressActivity extends AppCompatActivity {
|
||||
|
||||
@@ -26,13 +40,28 @@ public class CgProfileProgressActivity extends AppCompatActivity {
|
||||
binding = ActivityCgProfileProgressBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
startAnimation();
|
||||
|
||||
initViews();
|
||||
new Handler().postDelayed(() -> {
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
|
||||
clickEvents();
|
||||
}));
|
||||
binding.loadingView.setVisibility(View.GONE);
|
||||
binding.profileProgressView.setVisibility(View.VISIBLE);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
}), false);
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
|
||||
private void startAnimation() {
|
||||
Glide.with(this)
|
||||
.asGif()
|
||||
.load(R.raw.ic_sync_data)
|
||||
.into(binding.loadingAnim);
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
@@ -43,6 +72,16 @@ public class CgProfileProgressActivity extends AppCompatActivity {
|
||||
finish();
|
||||
});
|
||||
|
||||
binding.profileInfo.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(this, PatientProfileInfoActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
binding.geoFencing.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(this, CgGeoFencingActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
binding.medicReminder.setOnClickListener(v -> {
|
||||
gotoProfileShower(MED_REMINDER_F);
|
||||
});
|
||||
@@ -0,0 +1,421 @@
|
||||
package com.ssb.simplitend.caregiverdashboard.activities;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.skydoves.powerspinner.OnSpinnerItemSelectedListener;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.databinding.ActivityPersonalInfoBinding;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
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.lang.reflect.Array;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
public class PatientProfileInfoActivity extends AppCompatActivity {
|
||||
|
||||
private static final String TAG = "PatientProfileInfoActiv";
|
||||
|
||||
// view binding
|
||||
protected ActivityPersonalInfoBinding binding;
|
||||
|
||||
private DatePickerDialog datePickerDialog;
|
||||
|
||||
private ArrayList<String> countryCodeList;
|
||||
|
||||
private PatientData patientData;
|
||||
|
||||
private ArrayList<String> countryList;
|
||||
private HashMap<String, ArrayList<String>> country_N_states_map;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityPersonalInfoBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData -> {
|
||||
this.patientData = careGiverData.patientDetails;
|
||||
|
||||
setDetails();
|
||||
}), true);
|
||||
|
||||
binding.name.requestFocus();
|
||||
}
|
||||
|
||||
private void setDetails() {
|
||||
if (patientData == null) {
|
||||
Toast.makeText(this, "Couldn't load patient data.", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
binding.name.setText(patientData.first_name);
|
||||
binding.dob.setText(formatDateToMMddYYYY("yyyy-MM-dd", patientData.date_of_birth));
|
||||
binding.contactNumber.setText(patientData.phone_number);
|
||||
binding.email.setText(patientData.email);
|
||||
|
||||
binding.street.setText(patientData.address_line1);
|
||||
binding.town.setText(patientData.city);
|
||||
binding.zipCode.setText(patientData.post_code);
|
||||
|
||||
String country = patientData.country;
|
||||
String state = patientData.state;
|
||||
if (!countryList.contains(country)){
|
||||
countryList.add(country);
|
||||
ArrayList<String> states = new ArrayList<>();
|
||||
states.add(state);
|
||||
country_N_states_map.put(country, states);
|
||||
}
|
||||
|
||||
binding.countrySpinner.selectItemByIndex(countryList.indexOf(country));
|
||||
try {
|
||||
binding.stateSpinner.selectItemByIndex(country_N_states_map.get(country).indexOf(state));
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Couldn't load state.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
loadCountriesAndStates();
|
||||
|
||||
// date picker dialog
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) - 18);
|
||||
|
||||
datePickerDialog = new DatePickerDialog(this,
|
||||
(datePicker, year, month, dayOfMonth) -> {
|
||||
setDOB(year, month, dayOfMonth);
|
||||
|
||||
binding.contactNumber.requestFocus();
|
||||
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
|
||||
}, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
|
||||
datePickerDialog.getDatePicker().setMaxDate(calendar.getTimeInMillis());
|
||||
|
||||
// creating this view model here as it contains the fetching code
|
||||
countryCodeList = AppUtil.loadCountryCodeDropDown(this);
|
||||
|
||||
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);
|
||||
|
||||
setPhoneNumberInputFilter();
|
||||
|
||||
setFocusManager();
|
||||
|
||||
inputFieldFocusManage();
|
||||
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.save.setOnClickListener(v -> {
|
||||
onBackPressed();
|
||||
});
|
||||
|
||||
binding.dob.setOnClickListener(v -> {
|
||||
pickDate();
|
||||
});
|
||||
|
||||
binding.backBtn.setOnClickListener(v -> {
|
||||
onBackPressed();
|
||||
});
|
||||
}
|
||||
|
||||
private void setDOB(int year, int month, int dayOfMonth) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.YEAR, year);
|
||||
cal.set(Calendar.MONTH, month);
|
||||
cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy", Locale.getDefault());
|
||||
|
||||
String selected_time = sdf.format(cal.getTime());
|
||||
binding.dob.setText(selected_time);
|
||||
}
|
||||
|
||||
// This adds textChangeListener to all the EditTexts available to remove error if available
|
||||
private void setPhoneNumberInputFilter() {
|
||||
// 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;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() == -1) {
|
||||
country_code = "+1";
|
||||
} else {
|
||||
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 (!countryCodeList.contains(country_code)) {
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
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.contactNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10) {
|
||||
// max length should be 10
|
||||
return "";
|
||||
} else {
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
binding.contactNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
|
||||
}
|
||||
|
||||
private void setFocusManager() {
|
||||
binding.name.setOnEditorActionListener((textView, i, keyEvent) -> {
|
||||
AppUtil.closeKeyboard(this);
|
||||
binding.name.clearFocus();
|
||||
|
||||
pickDate();
|
||||
return true;
|
||||
});
|
||||
|
||||
binding.email.setOnEditorActionListener(((textView, i, keyEvent) -> {
|
||||
AppUtil.closeKeyboard(this);
|
||||
binding.email.clearFocus();
|
||||
|
||||
binding.countrySpinner.show();
|
||||
return true;
|
||||
}));
|
||||
}
|
||||
|
||||
private void pickDate() {
|
||||
|
||||
if (datePickerDialog == null) return;
|
||||
|
||||
datePickerDialog.show();
|
||||
|
||||
}
|
||||
|
||||
public String formatDateToMMddYYYY(String inputFormat, String input_date) {
|
||||
SimpleDateFormat out_sdf = new SimpleDateFormat("MM-dd-yyyy", Locale.getDefault());
|
||||
SimpleDateFormat in_sdf = new SimpleDateFormat(inputFormat, Locale.getDefault());
|
||||
|
||||
try {
|
||||
Date date = in_sdf.parse(input_date);
|
||||
input_date = out_sdf.format(date);
|
||||
|
||||
// setting it to datepickerdialog
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
if (datePickerDialog != null) {
|
||||
datePickerDialog.getDatePicker().updateDate(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
return input_date;
|
||||
}
|
||||
|
||||
return input_date;
|
||||
}
|
||||
|
||||
private void inputFieldFocusManage() {
|
||||
|
||||
binding.town.setOnEditorActionListener((textView, i, keyEvent) -> {
|
||||
AppUtil.closeKeyboard(this);
|
||||
binding.town.clearFocus();
|
||||
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(PatientProfileInfoActivity.this);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void loadCountriesAndStates() {
|
||||
|
||||
countryList = new ArrayList<>();
|
||||
|
||||
country_N_states_map = new HashMap<>();
|
||||
|
||||
try {
|
||||
|
||||
String country_n_states_str = readCountryNStates(this);
|
||||
|
||||
JSONArray country_n_states = new JSONObject(country_n_states_str).getJSONArray("countries");
|
||||
|
||||
Log.d(TAG, "loadCountriesAndStates: " + country_n_states);
|
||||
|
||||
for (int i = 0; i < country_n_states.length(); i++) {
|
||||
|
||||
String country = country_n_states.getJSONObject(i).getString("country");
|
||||
countryList.add(country);
|
||||
|
||||
JSONArray states = country_n_states.getJSONObject(i).getJSONArray("states");
|
||||
|
||||
ArrayList<String> stateList = new ArrayList<>();
|
||||
|
||||
for (int j = 0; j < states.length(); j++) {
|
||||
stateList.add(states.getString(j));
|
||||
}
|
||||
|
||||
country_N_states_map.put(country, stateList);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
Log.e(TAG, "load country and states: ", e);
|
||||
}
|
||||
|
||||
Log.d(TAG, "loadCountriesAndStates: " + countryList);
|
||||
|
||||
binding.stateSpinner.setLifecycleOwner(this);
|
||||
binding.countrySpinner.setLifecycleOwner(this);
|
||||
|
||||
binding.countrySpinner.setItems(countryList);
|
||||
|
||||
|
||||
// selecting United States country as by default
|
||||
// if (countryList.contains(UNITED_STATES)){
|
||||
// binding.countrySpinner.selectItemByIndex(countryList.indexOf(UNITED_STATES));
|
||||
//
|
||||
// if (country_N_states_map.containsKey(UNITED_STATES))
|
||||
// {
|
||||
// binding.stateSpinner.setItems(country_N_states_map.get(UNITED_STATES));
|
||||
// }
|
||||
// }
|
||||
|
||||
binding.stateSpinner.setDismissWhenNotifiedItemSelected(true);
|
||||
binding.countrySpinner.setDismissWhenNotifiedItemSelected(true);
|
||||
|
||||
binding.stateSpinner.setIsFocusable(true);
|
||||
binding.countrySpinner.setIsFocusable(true);
|
||||
|
||||
binding.countrySpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
|
||||
binding.countrySpinner.setError(null);
|
||||
|
||||
ArrayList<String> stateList;
|
||||
|
||||
if (country_N_states_map.containsKey(t1) && country_N_states_map.get(t1) != null) {
|
||||
stateList = country_N_states_map.get(t1);
|
||||
} else {
|
||||
stateList = new ArrayList<>();
|
||||
}
|
||||
|
||||
if (stateList != null) {
|
||||
binding.stateSpinner.setItems(stateList);
|
||||
binding.stateSpinner.clearSelectedItem();
|
||||
}
|
||||
|
||||
binding.street.requestFocus();
|
||||
|
||||
getWindow()
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
});
|
||||
|
||||
binding.stateSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
binding.stateSpinner.setError(null);
|
||||
binding.zipCode.requestFocus();
|
||||
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public String readCountryNStates(Context context) throws IOException {
|
||||
StringBuilder returnString = new StringBuilder();
|
||||
|
||||
InputStream fIn = context.getResources().openRawResource(R.raw.country_n_states);
|
||||
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, "readCountryNStates: ", e);
|
||||
}
|
||||
|
||||
return returnString.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ssb.simplitend.caregiverdashboard;
|
||||
package com.ssb.simplitend.caregiverdashboard.activities;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -48,7 +48,7 @@ public class PatientProfileShowerActivity extends AppCompatActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
addFragment(fragment);
|
||||
addFragment(fragment, which_f);
|
||||
|
||||
}
|
||||
|
||||
@@ -74,9 +74,13 @@ public class PatientProfileShowerActivity extends AppCompatActivity {
|
||||
return fragment;
|
||||
}
|
||||
|
||||
private void addFragment(Fragment fragment) {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fcv_profile_shower, fragment)
|
||||
.commitAllowingStateLoss();
|
||||
private void addFragment(Fragment fragment, String tag) {
|
||||
try {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fcv_profile_shower, fragment, tag)
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception e) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,244 @@
|
||||
package com.ssb.simplitend.cg_geofencing;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.OnMapReadyCallback;
|
||||
import com.google.android.gms.maps.SupportMapFragment;
|
||||
import com.google.android.gms.maps.model.CameraPosition;
|
||||
import com.google.android.gms.maps.model.CircleOptions;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.android.gms.maps.model.MarkerOptions;
|
||||
import com.google.android.libraries.places.api.Places;
|
||||
import com.google.android.libraries.places.api.model.Place;
|
||||
import com.google.android.libraries.places.widget.Autocomplete;
|
||||
import com.google.android.libraries.places.widget.model.AutocompleteActivityMode;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.databinding.ActivityCgGeofencingBinding;
|
||||
import com.ssb.simplitend.databinding.GeofenceBottomSheetBinding;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
public class CgGeoFencingActivity extends AppCompatActivity {
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class CgGeoFencingActivity extends AppCompatActivity implements OnMapReadyCallback {
|
||||
|
||||
// view binding
|
||||
protected ActivityCgGeofencingBinding binding;
|
||||
|
||||
// bottom sheet binding
|
||||
private BottomSheetDialog bottomSheetDialog;
|
||||
|
||||
private GeofenceBottomSheetBinding geofence_bs_binding;
|
||||
|
||||
private PatientData patientData;
|
||||
|
||||
private GoogleMap mMap;
|
||||
|
||||
private LatLng mLatLng;
|
||||
|
||||
private ActivityResultLauncher<Intent> startAutocompleteMapSearch;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityCgGeofencingBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
geofence_bs_binding = GeofenceBottomSheetBinding.inflate(getLayoutInflater());
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData -> {
|
||||
if (careGiverData == null) return;;
|
||||
|
||||
this.patientData = careGiverData.patientDetails;
|
||||
}), true);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
|
||||
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.geofence_map);
|
||||
if (mapFragment != null) {
|
||||
mapFragment.getMapAsync(this);
|
||||
}else{
|
||||
Toast.makeText(this, "Couldn't load map. Please try again.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
bottomSheetDialog = new BottomSheetDialog(this, R.style.BottomSheetDialog);
|
||||
bottomSheetDialog.setContentView(geofence_bs_binding.getRoot());
|
||||
bottomSheetDialog.setCancelable(true);
|
||||
|
||||
try {
|
||||
geofence_bs_binding.unitSpinner.selectItemByIndex(0);
|
||||
}catch (Exception e){
|
||||
ArrayList<String> arrayList = new ArrayList<>();
|
||||
arrayList.add("Kms");
|
||||
arrayList.add("Miles");
|
||||
geofence_bs_binding.unitSpinner.setItems(arrayList);
|
||||
geofence_bs_binding.unitSpinner.selectItemByIndex(0);
|
||||
}
|
||||
|
||||
geofence_bs_binding.unitSpinner.setLifecycleOwner(this);
|
||||
geofence_bs_binding.unitSpinner.setIsFocusable(true);
|
||||
|
||||
registerMapSearchResultLauncher();
|
||||
|
||||
}
|
||||
|
||||
private void clickEvents(){
|
||||
binding.backBtn.setOnClickListener(v -> onBackPressed());
|
||||
|
||||
binding.setGf.setOnClickListener(v -> {
|
||||
if (bottomSheetDialog != null){
|
||||
bottomSheetDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
geofence_bs_binding.save.setOnClickListener(v -> {
|
||||
Float radius = getRadius();
|
||||
|
||||
if (radius == null){
|
||||
Toast.makeText(this, "Invalid radius", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
// convert to meters
|
||||
if (geofence_bs_binding.unitSpinner.getSelectedIndex() == 1){
|
||||
// it is miles
|
||||
radius = radius * 1609.34f; // to meters
|
||||
}else{
|
||||
// it is kms
|
||||
radius = radius * 1000; // to meters
|
||||
}
|
||||
|
||||
if (radius < 100){
|
||||
Toast.makeText(this, "Radius should be minimum 100 meters.", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
addMarker(mLatLng);
|
||||
addCircle(radius);
|
||||
});
|
||||
|
||||
binding.search.setOnClickListener(v -> {
|
||||
|
||||
List<Place.Field> fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);
|
||||
|
||||
Intent intent = new Autocomplete.IntentBuilder(AutocompleteActivityMode.OVERLAY, fields)
|
||||
.build(this);
|
||||
|
||||
startAutocompleteMapSearch.launch(intent);
|
||||
});
|
||||
}
|
||||
|
||||
private void addCircle(float radius) {
|
||||
if (mMap == null) return;
|
||||
|
||||
CircleOptions circleOptions = new CircleOptions();
|
||||
circleOptions.center(mLatLng);
|
||||
circleOptions.radius(radius);
|
||||
circleOptions.strokeWidth(0);
|
||||
circleOptions.fillColor(Color.argb(150, 167, 205, 242));
|
||||
|
||||
mMap.addCircle(circleOptions);
|
||||
bottomSheetDialog.dismiss();
|
||||
mMap.animateCamera(CameraUpdateFactory.zoomTo(13));
|
||||
|
||||
Toast.makeText(this, "Geofence added. Radius : " + radius + " meters.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private Float getRadius() {
|
||||
Float radius = null;
|
||||
|
||||
try {
|
||||
radius = Float.valueOf(geofence_bs_binding.radius.getText().toString());
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
}
|
||||
|
||||
return radius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(@NonNull GoogleMap googleMap) {
|
||||
this.mMap = googleMap;
|
||||
|
||||
LatLng latLng;
|
||||
|
||||
// loading patient's location
|
||||
try {
|
||||
if (patientData == null) throw new Exception();
|
||||
|
||||
double lat = Double.parseDouble(patientData.lat);
|
||||
double lng = Double.parseDouble(patientData.lng);
|
||||
|
||||
latLng = new LatLng(lat, lng);
|
||||
}catch (Exception e){
|
||||
// near marine drive
|
||||
latLng = new LatLng(18.93294274664527, 72.82806102186441);
|
||||
}
|
||||
|
||||
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));
|
||||
addMarker(latLng);
|
||||
}
|
||||
|
||||
private void addMarker(@NonNull LatLng latLng){
|
||||
if (mMap == null || patientData == null) return;
|
||||
|
||||
this.mLatLng = latLng;
|
||||
|
||||
mMap.clear();
|
||||
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position(latLng)
|
||||
.title(patientData.first_name + "");
|
||||
|
||||
mMap.addMarker(markerOptions);
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));;
|
||||
}
|
||||
|
||||
private void registerMapSearchResultLauncher() {
|
||||
|
||||
// initializing places
|
||||
|
||||
// Initialize the SDK
|
||||
Places.initialize(this, getString(R.string.GOOGLE_MAPS_API_KEY));
|
||||
|
||||
startAutocompleteMapSearch = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
result -> {
|
||||
if (result.getResultCode() == Activity.RESULT_OK) {
|
||||
Intent intent = result.getData();
|
||||
if (intent != null) {
|
||||
Place place = Autocomplete.getPlaceFromIntent(intent);
|
||||
|
||||
if (place.getLatLng() == null) return;
|
||||
|
||||
addMarker(place.getLatLng());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,7 @@ import androidx.viewpager2.widget.ViewPager2;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.caregiverdashboard.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.CgProfileProgressActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.PatientProfileShowerActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.CgProfileProgressActivity;
|
||||
import com.ssb.simplitend.cg_subscription.mvp.SubscriptionContracts;
|
||||
import com.ssb.simplitend.cg_subscription.mvp.SubscriptionCredentials;
|
||||
import com.ssb.simplitend.cg_subscription.mvp.SubscriptionPresenter;
|
||||
@@ -63,7 +61,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData -> {
|
||||
this.careGiverData = careGiverData;
|
||||
}));
|
||||
}), true);
|
||||
|
||||
initViews();
|
||||
|
||||
|
||||
@@ -82,10 +82,14 @@ public class MedicalInfoFragment extends Fragment implements ProfileContracts.Ge
|
||||
// there may be a IllegalStateException as this same fragment is used from another fragment
|
||||
// and not through the nav graph
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddMedicalInfoFragment.class, null)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddMedicalInfoFragment.class, null)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -103,10 +107,14 @@ public class MedicalInfoFragment extends Fragment implements ProfileContracts.Ge
|
||||
// there may be a IllegalStateException as this same fragment is used from another fragment
|
||||
// and not through the nav graph
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddMedicalInfoFragment.class, bundle)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddMedicalInfoFragment.class, bundle)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,10 +112,14 @@ public class ReminderFragment extends Fragment implements RecyclerTouchListener.
|
||||
// there may be a IllegalStateException as this same fragment is used from another fragment
|
||||
// and not through the nav graph
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddReminderFragment.class, null)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddReminderFragment.class, null)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -426,10 +430,14 @@ public class ReminderFragment extends Fragment implements RecyclerTouchListener.
|
||||
// there may be a IllegalStateException as this same fragment is used from another fragment
|
||||
// and not through the nav graph
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.add(R.id.fcv_profile_shower, AddReminderFragment.class, bundle)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.add(R.id.fcv_profile_shower, AddReminderFragment.class, bundle)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,10 +116,14 @@ public class RoutineFragment extends Fragment implements RoutineAdapter.ClickLis
|
||||
// there may be a IllegalStateException as this same fragment is used from another fragment
|
||||
// and not through the nav graph
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddRoutineFragment.class, null)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, AddRoutineFragment.class, null)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -400,10 +404,14 @@ public class RoutineFragment extends Fragment implements RoutineAdapter.ClickLis
|
||||
// there may be a IllegalStateException as this same fragment is used from another fragment
|
||||
// and not through the nav graph
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.add(R.id.fcv_profile_shower, AddRoutineFragment.class, bundle)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.add(R.id.fcv_profile_shower, AddRoutineFragment.class, bundle)
|
||||
.addToBackStack("add_reminder")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import androidx.core.content.ContextCompat;
|
||||
import com.daimajia.androidanimations.library.Techniques;
|
||||
import com.daimajia.androidanimations.library.YoYo;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.caregiverdashboard.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.databinding.CgAuthFragmentBinding;
|
||||
|
||||
public class CgAuthActivity extends AppCompatActivity {
|
||||
|
||||
@@ -20,7 +20,7 @@ import androidx.navigation.Navigation;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.caregiverdashboard.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.databinding.CgSignInFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
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.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -36,6 +37,8 @@ public class AddContactFragment extends Fragment implements WelcomeContracts.Con
|
||||
// view binding
|
||||
protected AddContactFragmentBinding binding;
|
||||
|
||||
public static final String CONTACT_INFO_F = "contact_info_f";
|
||||
|
||||
protected AddContactAdapter contactAdapter;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
@@ -91,7 +94,18 @@ public class AddContactFragment extends Fragment implements WelcomeContracts.Con
|
||||
});
|
||||
|
||||
binding.nextBtn.setOnClickListener(v ->
|
||||
Navigation.findNavController(v).navigate(R.id.action_addContactFragment_to_profileProgressFragment));
|
||||
{
|
||||
try {
|
||||
Navigation.findNavController(v).navigate(R.id.action_addContactFragment_to_profileProgressFragment);
|
||||
}catch (Exception e){
|
||||
// this fragment is not only opened by the welcome_nav_graph
|
||||
// but, also by other fragments
|
||||
Activity activity = getActivity();
|
||||
if (activity != null){
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -132,16 +146,40 @@ public class AddContactFragment extends Fragment implements WelcomeContracts.Con
|
||||
"Add from contacts or manually?",
|
||||
"Contacts",
|
||||
((dialogInterface, i) -> {
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_addContactFragment_to_contactListFragment);
|
||||
try {
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_addContactFragment_to_contactListFragment);
|
||||
}catch (Exception e){
|
||||
// this fragment is also opened by other context
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, ContactListFragment.class, null)
|
||||
.addToBackStack("contact_list_f")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}),
|
||||
"Manually",
|
||||
((dialogInterface, i) -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(TO_EDIT_KEY, false);
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_addContactFragment_to_createContactFragment, bundle);
|
||||
try {
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_addContactFragment_to_createContactFragment, bundle);
|
||||
}catch (Exception e){
|
||||
// this fragment is also opened by other context
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, CreateContactFragment.class, bundle)
|
||||
.addToBackStack("create_contact_f")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
@@ -150,8 +188,21 @@ public class AddContactFragment extends Fragment implements WelcomeContracts.Con
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(CONTACT_DATA_KEY, contactData);
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_addContactFragment_to_contactInfoFragment, bundle);
|
||||
try {
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_addContactFragment_to_contactInfoFragment, bundle);
|
||||
}catch (Exception e){
|
||||
// this fragment is also opened by other context
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, ContactInfoFragment.class, bundle)
|
||||
.addToBackStack(CONTACT_INFO_F)
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
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.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
@@ -63,7 +64,10 @@ public class ContactInfoFragment extends Fragment implements WelcomeContracts.De
|
||||
contactData = (ContactData) getArguments().getSerializable(CONTACT_DATA_KEY);
|
||||
} else {
|
||||
// no arguments received
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null){
|
||||
activity.onBackPressed();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -143,8 +147,19 @@ public class ContactInfoFragment extends Fragment implements WelcomeContracts.De
|
||||
bundle.putBoolean(TO_EDIT_KEY, true);
|
||||
bundle.putSerializable(CONTACT_KEY, contactData);
|
||||
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_contactInfoFragment_to_createContactFragment, bundle);
|
||||
try {
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_contactInfoFragment_to_createContactFragment, bundle);
|
||||
}catch (Exception e){
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, CreateContactFragment.class, bundle)
|
||||
.addToBackStack("create_contact_f")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
binding.callBtn.setOnClickListener(v -> {
|
||||
@@ -167,7 +182,10 @@ public class ContactInfoFragment extends Fragment implements WelcomeContracts.De
|
||||
public void onContactDelete() {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(requireActivity(), "Contact deleted successfully.", Toast.LENGTH_SHORT).show();
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null){
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -87,7 +87,20 @@ public class ContactListFragment extends Fragment {
|
||||
Bundle bundle = new Bundle();
|
||||
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);
|
||||
|
||||
try {
|
||||
Navigation.findNavController(binding.getRoot()).navigate(R.id.action_contactListFragment_to_createContactFragment, bundle);
|
||||
}catch (Exception e){
|
||||
// this fragment is not only opened by the welcome_vav_graph
|
||||
try {
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.replace(R.id.fcv_profile_shower, CreateContactFragment.class, bundle)
|
||||
.addToBackStack("create_contact_f")
|
||||
.commitAllowingStateLoss();
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
@@ -389,7 +390,16 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
if (bsd != null) bsd.dismiss();
|
||||
|
||||
Toast.makeText(requireActivity(), "Contact updated successFully.", Toast.LENGTH_SHORT).show();
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack(R.id.addContactFragment, false);
|
||||
try {
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack(R.id.addContactFragment, false);
|
||||
}catch (Exception e){
|
||||
// this fragment is not only opened by the welcome_nav_graph
|
||||
try {
|
||||
getParentFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
}catch (Exception e2){
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
|
||||
}, 3600);
|
||||
}
|
||||
@@ -453,7 +463,12 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
Log.e(TAG, "onFailure: message : " + message + "\n", t);
|
||||
|
||||
progressDialog.dismiss();
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
|
||||
Activity activity = getActivity();
|
||||
if (activity != null){
|
||||
activity.onBackPressed();
|
||||
}
|
||||
|
||||
Toast.makeText(requireContext(), "Couldn't load contact", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@@ -463,7 +478,16 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
Log.d(TAG, "onContactCreated: " + contact);
|
||||
progressDialog.dismiss();
|
||||
|
||||
Navigation.findNavController(binding.getRoot()).navigate(R.id.action_createContactFragment_to_addContactFragment);
|
||||
try {
|
||||
Navigation.findNavController(binding.getRoot()).navigate(R.id.action_createContactFragment_to_addContactFragment);
|
||||
}catch (Exception e){
|
||||
// this fragment is opened from outside of welcome_nav_graph
|
||||
try {
|
||||
getParentFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
} catch (Exception ex) {
|
||||
// user may be out of context
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.caregiverdashboard.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.databinding.SplashFragmentBinding;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.patientprofile.PatientProfileAPIService;
|
||||
|
||||
14
app/src/main/res/drawable/ic_contacts.xml
Normal file
14
app/src/main/res/drawable/ic_contacts.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="104dp"
|
||||
android:height="104dp"
|
||||
android:viewportWidth="104"
|
||||
android:viewportHeight="104">
|
||||
<path
|
||||
android:pathData="M16.2,1c-2.7,1.1 -5.2,6.6 -5.2,11.5 0,3.2 -0.2,3.5 -3.1,3.5 -4.2,-0 -6.5,1.5 -7.3,4.5 -0.6,2.5 0.7,6.4 2.8,7.7 0.6,0.4 2.6,0.8 4.4,0.8l3.2,-0 0,8 0,8 -3,-0c-3.6,-0 -8,3.9 -8,7 0,3.1 4.4,7 8,7l3,-0 0,7 0,7 -3,-0c-3.6,-0 -8,3.9 -8,7 0,3.1 4.4,7 8,7 2.8,-0 3,0.2 3,4 0,5.7 2.4,10.8 5.5,12 1.5,0.6 5.3,1 8.6,1l5.9,-0 0,-52 0,-52 -6.2,0.1c-3.5,-0 -7.3,0.4 -8.6,0.9zM21,22.5c0,1.2 -1.5,1.5 -7.5,1.5 -6,-0 -7.5,-0.3 -7.5,-1.5 0,-1.2 1.5,-1.5 7.5,-1.5 6,-0 7.5,0.3 7.5,1.5zM20.5,52c0,1.1 -1.5,1.6 -6.4,1.8 -6.3,0.3 -8.9,-0.6 -7.7,-2.7 0.5,-0.7 3.4,-1 7.4,-0.9 5.2,0.2 6.7,0.6 6.7,1.8zM20.8,80.2c-0.3,0.9 -3,1.4 -7.6,1.6 -6,0.2 -7.2,-0 -7.2,-1.3 0,-1.2 1.4,-1.5 7.6,-1.5 5.6,-0 7.5,0.3 7.2,1.2z"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M34,52l0,52 31.9,-0 32,-0 2.8,-2.4 2.8,-2.4 0,-47.2 0,-47.2 -2.8,-2.4 -2.8,-2.4 -32,-0 -31.9,-0 0,52zM72.2,32.8c7.4,6.9 2.4,19.2 -7.7,19.2 -5.2,-0 -10.5,-5.3 -10.5,-10.4 0,-10.8 10.7,-15.9 18.2,-8.8zM78.5,59.4c4.5,2.9 6.5,7.4 6.5,14.4l0,6.2 -20.2,-0.2 -20.3,-0.3 0.1,-5c0,-2.8 0.3,-6.2 0.7,-7.6 0.9,-3.4 5.2,-7.7 9.1,-8.9 4.9,-1.5 21.1,-0.6 24.1,1.4z"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
||||
14
app/src/main/res/drawable/ic_geofence.xml
Normal file
14
app/src/main/res/drawable/ic_geofence.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="80dp"
|
||||
android:height="100dp"
|
||||
android:viewportWidth="80"
|
||||
android:viewportHeight="100">
|
||||
<path
|
||||
android:pathData="M32.4,1.1c-20.8,5 -31.7,30 -21.6,49.9 2.4,4.8 6.7,10.1 16.2,20l13,13.4 12.2,-12.8c6.8,-7.1 13.5,-14.6 15,-16.8 9.1,-13.3 7.3,-33.3 -4.2,-44.8 -7.7,-7.7 -20.4,-11.4 -30.6,-8.9zM47.8,17.4c9.4,4.9 13.6,16.7 9.3,26.1 -7,15.1 -27.2,15.1 -34.2,-0 -4.3,-9.2 -0.7,-19.8 8.6,-25.6 3.6,-2.3 12.4,-2.5 16.3,-0.5z"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M11.9,77.2c-1.2,2.4 -4.4,8.5 -7.1,13.5l-5,9.3 40.2,-0 40.1,-0 -7,-13.3 -7,-13.2 -5.2,-0.3 -5.2,-0.3 -7.9,7.8 -7.8,7.8 -7.8,-7.8c-7.7,-7.6 -7.8,-7.7 -13,-7.7 -5.1,-0 -5.2,0.1 -7.3,4.2z"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/top_right_corners_round.xml
Normal file
11
app/src/main/res/drawable/top_right_corners_round.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid
|
||||
android:color="@android:color/white"
|
||||
/>
|
||||
|
||||
<corners android:topRightRadius="60dp"/>
|
||||
|
||||
</shape>
|
||||
@@ -144,16 +144,20 @@
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/set_gf"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
|
||||
android:layout_margin="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
|
||||
android:layout_marginTop="8dp"
|
||||
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:padding="3dp"
|
||||
|
||||
app:srcCompat="@drawable/ic_setting"
|
||||
|
||||
app:tint="@color/black" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
tools:context=".caregiverdashboard.PatientProfileShowerActivity">
|
||||
tools:context=".caregiverdashboard.activities.PatientProfileShowerActivity">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fcv_profile_shower"
|
||||
|
||||
490
app/src/main/res/layout/activity_personal_info.xml
Normal file
490
app/src/main/res/layout/activity_personal_info.xml
Normal file
@@ -0,0 +1,490 @@
|
||||
<?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:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="35sp"
|
||||
android:layout_height="35sp"
|
||||
android:layout_margin="15dp"
|
||||
android:contentDescription="@string/back_button"
|
||||
android:padding="5dp"
|
||||
android:paddingStart="-15dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:src="@drawable/arrow_back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/personal_information"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/name"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/name"
|
||||
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_full_name"
|
||||
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:drawableStart="@drawable/ic_user"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="name"
|
||||
android:inputType="textCapWords"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/date_of_birth"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dob"
|
||||
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_date_of_birth"
|
||||
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:drawablePadding="10dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_dob" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/contact_number"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/phone_number"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
android:src="@drawable/ic_phone"
|
||||
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/contact_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>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/email_address"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
/>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="@string/optional"-->
|
||||
<!-- android:fontFamily="@font/nunito_medium"-->
|
||||
<!-- android:textAppearance="@style/TextAppearance.Material3.TitleMedium"-->
|
||||
<!-- android:textColor="@android:color/darker_gray"-->
|
||||
<!-- android:layout_marginStart="5dp"-->
|
||||
<!-- />-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
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_email_address"
|
||||
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:drawableStart="@drawable/ic_email"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="emailAddress"
|
||||
android:inputType="textEmailAddress"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_address"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:focusable="false"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_home"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_your_country"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
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"
|
||||
|
||||
/>
|
||||
|
||||
</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"
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_home"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/state_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_your_state"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
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"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/zip_code"
|
||||
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_zip_code"
|
||||
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:maxLength="6"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="number"
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:text="@string/save"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -16,124 +15,135 @@
|
||||
|
||||
android:layout_marginBottom="@dimen/_5sdp"
|
||||
|
||||
app:layout_constraintBottom_toTopOf="@+id/indicators"
|
||||
app:layout_constraintBottom_toTopOf="@+id/view"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<me.relex.circleindicator.CircleIndicator3
|
||||
android:id="@+id/indicators"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:ci_drawable="@drawable/selected_dot_primary"
|
||||
|
||||
app:ci_drawable_unselected="@drawable/unselected_dot_accent"
|
||||
app:ci_gravity="center"
|
||||
|
||||
app:ci_height="@dimen/_6sdp"
|
||||
app:ci_width="@dimen/_6sdp"
|
||||
|
||||
android:layout_marginBottom="@dimen/_10sdp"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/title"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/top_right_corners_round"
|
||||
android:elevation="25dp"
|
||||
android:paddingTop="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
android:layout_marginStart="@dimen/_15sdp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="@dimen/_5sdp"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/sub_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:text="@string/reinventing_connected_ncaregiving" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="@dimen/_15sdp"
|
||||
android:layout_marginEnd="@dimen/_15sdp"
|
||||
android:layout_marginBottom="@dimen/_15sdp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:text="@string/no_new_gadgets_monitor_your_loved_one_s_activity_using_his_or_her_smartphone"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="@dimen/_18ssp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/relativeLayout2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relativeLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="@dimen/_5sdp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/next_btn"
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
android:visibility="visible"
|
||||
|
||||
app:civ_circle_background_color="@color/color_primary"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/skip"
|
||||
<me.relex.circleindicator.CircleIndicator3
|
||||
android:id="@+id/indicators"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:text="@string/skip"
|
||||
android:textColor="@color/black"
|
||||
app:ci_drawable="@drawable/selected_dot_primary"
|
||||
|
||||
android:textSize="@dimen/_18ssp"
|
||||
app:ci_drawable_unselected="@drawable/unselected_dot_accent"
|
||||
app:ci_gravity="center"
|
||||
|
||||
android:paddingVertical="@dimen/_10sdp"
|
||||
app:ci_height="@dimen/_6sdp"
|
||||
app:ci_width="@dimen/_6sdp"
|
||||
|
||||
/>
|
||||
android:layout_marginBottom="@dimen/_10sdp"
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/gets_started"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/title"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:layout_marginStart="@dimen/_15sdp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="@dimen/_5sdp"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/sub_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:text="@string/reinventing_connected_ncaregiving" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="@dimen/_15sdp"
|
||||
android:layout_marginEnd="@dimen/_15sdp"
|
||||
android:layout_marginBottom="@dimen/_15sdp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="@dimen/_10sdp"
|
||||
android:text="@string/get_started"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/white_bg"
|
||||
android:text="@string/no_new_gadgets_monitor_your_loved_one_s_activity_using_his_or_her_smartphone"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="10dp" />
|
||||
android:textSize="@dimen/_18ssp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/relativeLayout2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/relativeLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="@dimen/_5sdp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/next_btn"
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
android:visibility="visible"
|
||||
|
||||
app:civ_circle_background_color="@color/color_primary"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/skip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:text="@string/skip"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:paddingVertical="@dimen/_10sdp"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/gets_started"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="@dimen/_10sdp"
|
||||
android:text="@string/get_started"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/white_bg"
|
||||
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="10dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
172
app/src/main/res/layout/geofence_bottom_sheet.xml
Normal file
172
app/src/main/res/layout/geofence_bottom_sheet.xml
Normal file
@@ -0,0 +1,172 @@
|
||||
<?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"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/top_round_corner"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/location"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="35sp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/location"
|
||||
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_location"
|
||||
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="name"
|
||||
android:inputType="textCapSentences"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/radius"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/radius"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
android:hint="@string/_0_00"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAlignment="center"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:maxLength="6"
|
||||
|
||||
android:inputType="numberDecimal"
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/unit_spinner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
android:padding="11dp"
|
||||
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_item_array="@array/radius_units"
|
||||
|
||||
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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/message"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/message"
|
||||
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_a_message"
|
||||
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="name"
|
||||
android:inputType="textCapSentences"
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:text="@string/save"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -2,7 +2,7 @@
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/welcome_nav_graph"
|
||||
app:startDestination="@id/profileProgressFragment">
|
||||
app:startDestination="@id/splashFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/welcomeFragment"
|
||||
|
||||
BIN
app/src/main/res/raw/ic_sync_data.gif
Normal file
BIN
app/src/main/res/raw/ic_sync_data.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 464 KiB |
@@ -318,5 +318,18 @@
|
||||
<string name="set_specific_geographic_areas_and_receive_instant_alerts_when_your_loved_one_leaves_the_geofenced_zone">Set specific geographic areas and receive instant alerts when your loved one leaves the geofenced zone.</string>
|
||||
<string name="destination_0_5m_away">Destination 0.5m away</string>
|
||||
<string name="_165_hasley_st_newark_nj_07102">165 Hasley St. Newark, NJ 07102</string>
|
||||
<string name="enter_your_location">Enter your location</string>
|
||||
<string name="location">Location</string>
|
||||
<string name="radius">Radius</string>
|
||||
<string name="_0_00">0.00</string>
|
||||
<string name="message">Message</string>
|
||||
<string name="enter_a_message">Enter a message</string>
|
||||
<string name="syncing_patient_information">Syncing patient information</string>
|
||||
<string name="we_are_currently_syncing_patient_data_this_may_take_a_few_seconds">We are currently syncing patient data. This may take a few seconds.</string>
|
||||
|
||||
<string-array name="radius_units">
|
||||
<item>Kms</item>
|
||||
<item>Miles</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user