This commit is contained in:
2023-10-06 20:04:35 +05:30
parent 5b56f826a4
commit 4470e5d2b1
16 changed files with 2308 additions and 26 deletions

View File

@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="RZCW41EJRPN" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-10-06T14:28:56.977625500Z" />
<runningDeviceTargetsSelectedWithDialog>
<Target>
<type value="RUNNING_DEVICE_TARGET" />

View File

@@ -1,6 +1,7 @@
package com.app.simplitend.apputils;
import static com.app.simplitend.apputils.Constants.ACTIVITY_EXTRA_KEY;
import static com.app.simplitend.apputils.Constants.MEDICATION_REFILL;
import static com.app.simplitend.apputils.Constants.REMINDER_EXTRA_KEY;
import static com.app.simplitend.articles.ArticleShowerActivity.ARTICLE_TITLE;
import static com.app.simplitend.articles.ArticleShowerActivity.ARTICLE_URL_KEY;
@@ -272,6 +273,11 @@ public abstract class AppUtil {
switch (content_type) {
case Constants.PATIENT_OUT_OF_GEOFENCE:
if (!getCgNotificationPref(context, GEOFENCE_NOTIFICATIONS)){
// notifications are off by user
return;
}
title = patient_name + " is out of Geofence!";
setupBottomSheet(binding,
@@ -292,6 +298,12 @@ public abstract class AppUtil {
bsd.show();
break;
case Constants.ACTIVITY_TIME:
if (!getCgNotificationPref(context, ACTIVITY_NOTIFICATIONS)){
// notifications are off by user
return;
}
String routine_description = null;
try {
RoutineDetails routine = (RoutineDetails) intent.getSerializableExtra(ACTIVITY_EXTRA_KEY);
@@ -338,6 +350,12 @@ public abstract class AppUtil {
bsd.show();
break;
case Constants.MEDICINE_TIME:
if (!getCgNotificationPref(context, MEDICATIONS_NOTIFICATIONS)){
// notifications are off by user
return;
}
String description = null;
try {
@@ -379,6 +397,14 @@ public abstract class AppUtil {
bsd.show();
break;
case Constants.PATIENT_REQUESTED_DIRECTION:
if (!getCgNotificationPref(context, DIRECTIONS_NOTIFICATIONS)){
// notifications are off by user
return;
}
title = patient_name + " requested for directions to home";
setupBottomSheet(binding,
R.drawable.img_directioin_requested,
title, body,
@@ -397,6 +423,14 @@ public abstract class AppUtil {
bsd.show();
break;
case Constants.PATIENT_REQUESTED_SOS:
if (!getCgNotificationPref(context, SOS_NOTIFICATIONS)){
// notifications are off by user
return;
}
title = patient_name + " contacted help";
setupBottomSheet(binding,
R.drawable.img_sos_requested,
title, body,
@@ -412,10 +446,52 @@ public abstract class AppUtil {
}), true);
});
bsd.show();
break;
case MEDICATION_REFILL:
if (!getCgNotificationPref(context, MEDICATION_REFILL_NOTIFICATIONS)){
// notifications are off by user
return;
}
String refill_description = null;
title = "Medicines refill";
try {
ReminderResult reminder = (ReminderResult) intent.getSerializableExtra(REMINDER_EXTRA_KEY);
if (reminder != null) {
body = reminder.medicine_name + " (" + reminder.dosage + " " + reminder.dosage_unit + ")";
if (reminder.medication_instruction == null) reminder.medication_instruction = "None";
refill_description = "Quantity to be refilled: " + reminder.medication_quantity;
}
} catch (Exception e) {
// do nothing
}
setupBottomSheet(binding,
R.drawable.img_med_refill,
title, body,
refill_description, "Text patient",
v -> {
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
if (careGiverData == null || careGiverData.patientDetails == null) {
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
return;
}
AppUtil.messageNumber(context, careGiverData.patientDetails.phone_number);
}), true);
});
bsd.show();
break;
}
// already returning
}
private static void setupBottomSheet(BottomSheetAlertBinding binding,
@@ -486,9 +562,18 @@ public abstract class AppUtil {
mySharedPref.setArrayList("APP_LIST", appList);
}
// removing contact listing
setWhiteListedContacts(context, null);
// geofence details clear
updatePatientGeofence(context, null, null, null, null);
// removing geofence
// removing geofence of same tag
removeGeofence(context);
}
public static void removeGeofence(Context context) {
Log.d(GEOFENCE_TAG, "REMOVING GEOFENCE ID:" + GEOFENCE_ID);
GeofencingClient geofencingClient = LocationServices.getGeofencingClient(context);
geofencingClient.removeGeofences(Collections.singletonList(GEOFENCE_ID)).addOnSuccessListener(v -> {
Log.d(GEOFENCE_TAG, "patientSignOut: GEOFENCE REMOVED");
@@ -535,6 +620,39 @@ public abstract class AppUtil {
public static void cgSignOut(Context context) {
saveCgData(null, -1, context);
setWantSecurityFlag(context, NOT_ASKED_CG_SECURITY);
// setting up notification prefs default to yes
setCgNotificationPref(context, MEDICATIONS_NOTIFICATIONS, true);
setCgNotificationPref(context, MEDICATION_REFILL_NOTIFICATIONS, true);
setCgNotificationPref(context, ACTIVITY_NOTIFICATIONS, true);
setCgNotificationPref(context, SOS_NOTIFICATIONS, true);
setCgNotificationPref(context, DIRECTIONS_NOTIFICATIONS, true);
setCgNotificationPref(context, GEOFENCE_NOTIFICATIONS, true);
}
// caregiver notification preference
public static final String MEDICATIONS_NOTIFICATIONS = "medications_notifications";
public static final String MEDICATION_REFILL_NOTIFICATIONS = "MEDICATION_REFILL_notifications";
public static final String ACTIVITY_NOTIFICATIONS = "ACTIVITY_notifications";
public static final String GEOFENCE_NOTIFICATIONS = "GEOFENCE_notifications";
public static final String SOS_NOTIFICATIONS = "SOS_notifications";
public static final String DIRECTIONS_NOTIFICATIONS = "DIRECTIONS_notifications";
public static void setCgNotificationPref(Context context,
String notification,
boolean check){
SharedPreferences sp = context.getSharedPreferences(CAREGIVER_DETAILS, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putBoolean(notification, check);
editor.apply();
}
public static boolean getCgNotificationPref(Context context,
String notification){
SharedPreferences sp = context.getSharedPreferences(CAREGIVER_DETAILS, Context.MODE_PRIVATE);
return sp.getBoolean(notification, true);
}
// patient geofencing
@@ -572,15 +690,20 @@ public abstract class AppUtil {
}
public static void setWhiteListedContacts(Context context, List<ContactData> contactList){
Set<String> contactSet = new HashSet<>();
Set<String> contactSet;
for (ContactData contactData: contactList){
contactSet.add(contactData.phone_number);
if (contactList != null) {
contactSet = new HashSet<>();
for (ContactData contactData: contactList){
contactSet.add(contactData.phone_number);
if (contactData.extra_phone_numbers != null){
String[] extra_phone_numbers = contactData.extra_phone_numbers.split(",");
contactSet.addAll(Arrays.asList(extra_phone_numbers));
if (contactData.extra_phone_numbers != null){
String[] extra_phone_numbers = contactData.extra_phone_numbers.split(",");
contactSet.addAll(Arrays.asList(extra_phone_numbers));
}
}
} else {
contactSet = null;
}
SharedPreferences sp = context.getSharedPreferences(PATIENT_DETAILS, Context.MODE_PRIVATE);

View File

@@ -12,4 +12,6 @@ public abstract class Constants {
public static final String PATIENT_REQUESTED_SOS = "patient_sos_clicked";
public static final String REMINDER_EXTRA_KEY = "reminder_extra_key";
public static final String ACTIVITY_EXTRA_KEY = "activity_extra_key";
public static final String MEDICATION_REFILL = "medication_refill";
}

View File

@@ -69,8 +69,21 @@ public class NotificationService implements INotificationServiceExtension {
return;
}
// addGeoFence(new LatLng(18.933154827942843, 72.82790520714602),
// 200, iNotificationReceivedEvent.getContext());
try {
double lat = extras.getDouble("lat");
double lng = extras.getDouble("lng");
double radius = extras.getDouble("radius");
Log.d(GEOFENCE_TAG, "DATA RECEIVED WITH NOTIFICATION : Lat/Lng: " + lat + "," + lng + " Radius: " + radius);
if (radius >= 0){
addGeoFence(new LatLng(lat, lng),
radius, iNotificationReceivedEvent.getContext());
}
}catch (Exception e){
Log.e(GEOFENCE_TAG, "COULDN'T CREATE GEOFENCE: " + e);
Log.e(GEOFENCE_TAG, "EXTRAS FROM NOTIFICATION: " + extras);
}
}else{
Log.d(GEOFENCE_TAG, "onNotificationReceived of PATIENT GEOFENCE CHANGED. BUT PATIENT IS LOGGED OUT.");
}
@@ -78,7 +91,9 @@ public class NotificationService implements INotificationServiceExtension {
}
@RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION)
private void addGeoFence(@NonNull LatLng latLng, float GEOFENCING_RADIUS , Context context) {
private void addGeoFence(@NonNull LatLng latLng, double GEOFENCING_RADIUS , Context context) {
AppUtil.removeGeofence(context);
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(context);
GeofencingClient geofencingClient = LocationServices.getGeofencingClient(context);
@@ -90,7 +105,7 @@ public class NotificationService implements INotificationServiceExtension {
}
}
Geofence geofence = geoFenceHelper.getGeoFence(GEOFENCE_ID, latLng, GEOFENCING_RADIUS,
Geofence geofence = geoFenceHelper.getGeoFence(GEOFENCE_ID, latLng, (float) GEOFENCING_RADIUS,
Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT);
GeofencingRequest geofencingRequest = geoFenceHelper.getGeoFencingRequest(geofence);
PendingIntent pendingIntent = geoFenceHelper.getPendingIntent();
@@ -101,7 +116,7 @@ public class NotificationService implements INotificationServiceExtension {
AppUtil.updatePatientGeofence(context, latLng.latitude+"", latLng.longitude+"",
GEOFENCING_RADIUS+"", "kms");
})
.addOnFailureListener(e -> Log.d(GEOFENCE_TAG, "onFailure: Geofence couldn't be added: " + e.getLocalizedMessage()));
.addOnFailureListener(e -> Log.d(GEOFENCE_TAG, "onFailure: Geofence couldn't be added: " + e.getLocalizedMessage() + " " + latLng + " Radius: " + GEOFENCING_RADIUS));
}
}

View File

@@ -84,6 +84,12 @@ public class CaregiverDashActivity extends AppCompatActivity implements
intent.putExtra(Constants.REMINDER_EXTRA_KEY, reminder);
}
}
}else if (Constants.MEDICATION_REFILL.equals(content_type) && viewModel.remindersList != null){
for (ReminderResult reminder: viewModel.remindersList){
if (id == reminder.id){
intent.putExtra(Constants.REMINDER_EXTRA_KEY, reminder);
}
}
}
}

View File

@@ -1,20 +1,22 @@
package com.app.simplitend.caregiverdashboard.activities;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider;
import com.app.simplitend.R;
import com.app.simplitend.apputils.AppUtil;
import com.app.simplitend.caregiverdashboard.activities.deactivateacc.DeActivateAccountActivity;
import com.app.simplitend.caregiverdashboard.mvvm.CaregiverMainViewModel;
import com.app.simplitend.caregiverdashboard.mvvm.CgHomeContracts;
import com.app.simplitend.databinding.ActivityCgSettingsBinding;
import com.app.simplitend.databinding.NotificationSetupBottomSheetBinding;
import com.app.simplitend.welcome.activities.WelcomeActivity;
import com.google.android.material.bottomsheet.BottomSheetDialog;
public class CaregiverSettingsActivity extends AppCompatActivity implements CgHomeContracts.SignOutCallback {
@@ -23,19 +25,62 @@ public class CaregiverSettingsActivity extends AppCompatActivity implements CgHo
private CaregiverMainViewModel viewModel;
private ProgressDialog progressDialog;
private BottomSheetDialog nSetupDialog;
protected NotificationSetupBottomSheetBinding nSBinding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityCgSettingsBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
viewModel = new ViewModelProvider(this).get(CaregiverMainViewModel.class);
progressDialog = new ProgressDialog(this);
nSBinding = NotificationSetupBottomSheetBinding.inflate(getLayoutInflater());
nSetupDialog = new BottomSheetDialog(this, R.style.BottomSheetDialog);
nSetupDialog.setContentView(nSBinding.getRoot());
setupNotifications();
initViews();
clickEvents();
}
private void setupNotifications() {
nSBinding.patientMedication.setChecked(AppUtil.getCgNotificationPref(this, AppUtil.MEDICATIONS_NOTIFICATIONS));
nSBinding.patientMedRefill.setChecked(AppUtil.getCgNotificationPref(this, AppUtil.MEDICATION_REFILL_NOTIFICATIONS));
nSBinding.patientActivity.setChecked(AppUtil.getCgNotificationPref(this, AppUtil.ACTIVITY_NOTIFICATIONS));
nSBinding.patientGeofence.setChecked(AppUtil.getCgNotificationPref(this, AppUtil.GEOFENCE_NOTIFICATIONS));
nSBinding.patientSos.setChecked(AppUtil.getCgNotificationPref(this, AppUtil.SOS_NOTIFICATIONS));
nSBinding.patientDirection.setChecked(AppUtil.getCgNotificationPref(this, AppUtil.DIRECTIONS_NOTIFICATIONS));
nSBinding.patientMedication.setOnCheckedChangeListener((compoundButton, b) -> {
AppUtil.setCgNotificationPref(this, AppUtil.MEDICATIONS_NOTIFICATIONS, b);
});
nSBinding.patientMedRefill.setOnCheckedChangeListener((compoundButton, b) -> {
AppUtil.setCgNotificationPref(this, AppUtil.MEDICATION_REFILL_NOTIFICATIONS, b);
});
nSBinding.patientActivity.setOnCheckedChangeListener((compoundButton, b) -> {
AppUtil.setCgNotificationPref(this, AppUtil.ACTIVITY_NOTIFICATIONS, b);
});
nSBinding.patientGeofence.setOnCheckedChangeListener((compoundButton, b) -> {
AppUtil.setCgNotificationPref(this, AppUtil.GEOFENCE_NOTIFICATIONS, b);
});
nSBinding.patientSos.setOnCheckedChangeListener((compoundButton, b) -> {
AppUtil.setCgNotificationPref(this, AppUtil.SOS_NOTIFICATIONS, b);
});
nSBinding.patientDirection.setOnCheckedChangeListener((compoundButton, b) -> {
AppUtil.setCgNotificationPref(this, AppUtil.DIRECTIONS_NOTIFICATIONS, b);
});
}
private void initViews() {
}
@@ -47,7 +92,8 @@ public class CaregiverSettingsActivity extends AppCompatActivity implements CgHo
AppUtil.showAlert(this,
"Are you sure?", "Do you want to sign out?",
getString(R.string.no),
((dialogInterface, i) -> {}),
((dialogInterface, i) -> {
}),
getString(R.string.yes),
((dialogInterface, i) -> {
progressDialog.setTitle("Please wait...");
@@ -75,6 +121,10 @@ public class CaregiverSettingsActivity extends AppCompatActivity implements CgHo
getString(R.string.privacy_policy));
});
binding.setupNoti.setOnClickListener(v -> {
nSetupDialog.show();
});
}
@Override

View File

@@ -103,6 +103,8 @@ public class PatientMainViewModel extends ViewModel {
@RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION)
private void addGeoFence(@NonNull LatLng latLng, float GEOFENCING_RADIUS , Activity activity, String unit) {
AppUtil.removeGeofence(activity);
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(activity);
GeofencingClient geofencingClient = LocationServices.getGeofencingClient(activity);
@@ -135,7 +137,7 @@ public class PatientMainViewModel extends ViewModel {
AppUtil.updatePatientGeofence(activity, latLng.latitude+"", latLng.longitude+"",
GEOFENCING_RADIUS+"", unit);
})
.addOnFailureListener(e -> Log.d(GEOFENCE_TAG, "onFailure: Geofence couldn't be added: " + e.getLocalizedMessage()));
.addOnFailureListener(e -> Log.d(GEOFENCE_TAG, "onFailure: Geofence couldn't be added: " + e.getLocalizedMessage() + " " + latLng + " Radius: " + GEOFENCING_RADIUS));
}
@@ -161,7 +163,7 @@ public class PatientMainViewModel extends ViewModel {
Map<String, String> body = new HashMap<>();
body.put("patient_id", patient_Id);
notificationApiService.notifyRequestedSOS(body, "Bearer " + token)
notificationApiService.notifyRequestedDirections(body, "Bearer " + token)
.enqueue(new Callback<CallResponse<Object>>() {
@Override
public void onResponse(Call<CallResponse<Object>> call, Response<CallResponse<Object>> response) {

View File

@@ -299,7 +299,7 @@ public class PatientDashboardFragment extends Fragment implements ProfileContrac
binding.dayOfWeek.setText(getDayOfWeek(calendar.get(Calendar.DAY_OF_WEEK)));
SimpleDateFormat date_sdf = new SimpleDateFormat("MMMM dd, yyyy", Locale.getDefault());
SimpleDateFormat date_sdf = new SimpleDateFormat("MMMM d, yyyy", Locale.getDefault());
String date_str = date_sdf.format(calendar.getTime());
binding.date.setText(date_str);

View File

@@ -236,7 +236,7 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
cal.set(Calendar.MONTH, month);
cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy", Locale.getDefault());
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault());
String selected_time = sdf.format(cal.getTime());
binding.getDate.setText(selected_time);
@@ -474,8 +474,8 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
}
private String formatDate(String medication_refill_date) {
String inputPattern = "yyyy-MM-dd";
String outputPattern = "MM-dd-yyyy";
String inputPattern = "yyyy-dd-MM";
String outputPattern = "dd-MM-yyyy";
SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern, Locale.getDefault());
SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern, Locale.getDefault());

View File

@@ -18,7 +18,6 @@ import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.GridLayoutManager;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.app.simplitend.R;
import com.app.simplitend.apputils.AppUtil;
import com.app.simplitend.apputils.PatientDataCache;
@@ -29,6 +28,7 @@ import com.app.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.Contact
import com.app.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactData;
import com.app.simplitend.welcome.welcomepatient.fragments.contacts.mvvm.models.ContactListResponse;
import com.app.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import java.util.ArrayList;
import java.util.List;
@@ -129,7 +129,11 @@ public class AddContactFragment extends Fragment implements WelcomeContracts.Con
}
PatientDataCache.setContactList(new ArrayList<>(contactList));
AppUtil.setWhiteListedContacts(requireContext(), contactList);
try {
AppUtil.setWhiteListedContacts(requireContext(), contactList);
} catch (Exception e) {
// do nothing
}
for (int i = contactList.size(); i<10; i++){
contactList.add(new ContactData(-1));

View File

@@ -0,0 +1,5 @@
<vector 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="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
</vector>

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,7 @@
android:textColor="@color/black" />
<TextView
android:id="@+id/setup_noti"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -151,7 +151,7 @@
android:text="@string/done"
android:textColor="@color/white"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textAllCaps="false"
android:textAllCaps="true"
android:paddingVertical="15dp"
app:cornerRadius="10dp"

View File

@@ -0,0 +1,296 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/round_corners"
android:orientation="vertical"
style="@style/BottomSheetDialog"
android:backgroundTint="@color/white">
<View
android:id="@+id/dash"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black"
android:layout_marginHorizontal="150dp"
android:layout_marginTop="15dp"
/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swipe_down"
android:fontFamily="@font/nunito_medium"
android:layout_gravity="center_horizontal"
android:textColor="@color/black"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:layout_marginHorizontal="15dp"
android:layout_marginTop="10dp"
/>
<!-- geofence-->
<!-- medication-->
<!-- activity-->
<!-- Medication refill-->
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:layout_marginHorizontal="15dp"
android:elevation="3dp"
android:background="@drawable/edit_text_bg_2"
android:orientation="horizontal">
<ImageView
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_medicine_outline"
android:layout_marginStart="15dp"
android:contentDescription="@string/terms_n_conditions"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/patient_medication"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:text="@string/patient_medication"
android:fontFamily="@font/nunito_medium"
android:textColor="@color/black"
android:textSize="@dimen/_14ssp"
android:layout_marginVertical="30dp"
android:layout_marginHorizontal="15dp"
app:switchMinWidth="60dp"
app:track="@drawable/switch_track_1"
app:thumbTint="@color/color_primary"
app:showText="false"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:layout_marginHorizontal="15dp"
android:elevation="3dp"
android:background="@drawable/edit_text_bg_2"
android:orientation="horizontal">
<ImageView
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_medicine_outline"
android:layout_marginStart="15dp"
android:contentDescription="@string/terms_n_conditions"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/patient_med_refill"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:text="@string/patient_medication_refill"
android:fontFamily="@font/nunito_medium"
android:textColor="@color/black"
android:textSize="@dimen/_14ssp"
android:layout_marginVertical="30dp"
android:layout_marginHorizontal="15dp"
app:switchMinWidth="60dp"
app:track="@drawable/switch_track_1"
app:thumbTint="@color/color_primary"
app:showText="false"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:layout_marginHorizontal="15dp"
android:elevation="3dp"
android:background="@drawable/edit_text_bg_2"
android:orientation="horizontal">
<ImageView
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_pat_activites"
android:layout_marginStart="15dp"
android:contentDescription="@string/terms_n_conditions"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/patient_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:text="@string/patient_activities"
android:fontFamily="@font/nunito_medium"
android:textColor="@color/black"
android:textSize="@dimen/_14ssp"
android:layout_marginVertical="30dp"
android:layout_marginHorizontal="15dp"
app:switchMinWidth="60dp"
app:track="@drawable/switch_track_1"
app:thumbTint="@color/color_primary"
app:showText="false"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:layout_marginHorizontal="15dp"
android:elevation="3dp"
android:background="@drawable/edit_text_bg_2"
android:orientation="horizontal">
<ImageView
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_location"
android:layout_marginStart="15dp"
android:contentDescription="@string/terms_n_conditions"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/patient_geofence"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:text="@string/patient_geofence"
android:fontFamily="@font/nunito_medium"
android:textColor="@color/black"
android:textSize="@dimen/_14ssp"
android:layout_marginVertical="30dp"
android:layout_marginHorizontal="15dp"
app:switchMinWidth="60dp"
app:track="@drawable/switch_track_1"
app:thumbTint="@color/color_primary"
app:showText="false"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:layout_marginHorizontal="15dp"
android:elevation="3dp"
android:background="@drawable/edit_text_bg_2"
android:orientation="horizontal">
<ImageView
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_sos"
android:layout_marginStart="15dp"
android:contentDescription="@string/terms_n_conditions"
app:tint="@color/black" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/patient_sos"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:text="@string/sos"
android:fontFamily="@font/nunito_medium"
android:textColor="@color/black"
android:textSize="@dimen/_14ssp"
android:textAllCaps="true"
android:layout_marginVertical="30dp"
android:layout_marginHorizontal="15dp"
app:switchMinWidth="60dp"
app:track="@drawable/switch_track_1"
app:thumbTint="@color/color_primary"
app:showText="false"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:layout_marginHorizontal="15dp"
android:elevation="3dp"
android:layout_marginBottom="25dp"
android:background="@drawable/edit_text_bg_2"
android:orientation="horizontal">
<ImageView
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_locations_target"
android:layout_marginStart="15dp"
android:contentDescription="@string/terms_n_conditions"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/patient_direction"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:text="@string/direction_requests"
android:fontFamily="@font/nunito_medium"
android:textColor="@color/black"
android:textSize="@dimen/_14ssp"
android:layout_marginVertical="30dp"
android:layout_marginHorizontal="15dp"
app:switchMinWidth="60dp"
app:track="@drawable/switch_track_1"
app:thumbTint="@color/color_primary"
app:showText="false"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@@ -330,7 +330,7 @@
<string name="contacts">Contacts</string>
<string name="medication">Medication</string>
<string name="medical_records">Medical Records</string>
<string name="patient_activities">Patient activities</string>
<string name="patient_activities">Activities</string>
<string name="subscription_plan">Subscription plan</string>
<string name="geofence">Geofence</string>
<string name="faq">FAQ</string>
@@ -434,5 +434,10 @@
<string name="no_notifications">No notifications</string>
<string name="your_plan">Your plan</string>
<string name="cancel_subscription">Cancel subscription</string>
<string name="patient_medication">Medication</string>
<string name="patient_medication_refill">Medication Refill</string>
<string name="patient_geofence">Geofence</string>
<string name="swipe_down">Swipe down</string>
<string name="direction_requests">Direction Requests</string>
</resources>