.
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
package com.ssb.simplitend.apputils;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.ssb.simplitend.patientprofile.PatientProfileAPIService;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeApiService;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
public class PatientDataCache {
|
||||
|
||||
private static PatientData patientData;
|
||||
|
||||
public synchronized static void setPatientData(PatientData data){
|
||||
patientData = data;
|
||||
}
|
||||
|
||||
public synchronized static void getPatientData(Context context,
|
||||
@NonNull PatientDataCache.GetPatientCallBack callBack,
|
||||
boolean show_progress){
|
||||
if (patientData != null){
|
||||
callBack.patientData(patientData);
|
||||
return;
|
||||
}
|
||||
|
||||
updatePatientData(context, callBack, show_progress);
|
||||
}
|
||||
|
||||
private static void updatePatientData(Context context, GetPatientCallBack callBack, boolean show_progress) {
|
||||
PatientProfileAPIService apiService = RetrofitHelper.getRetrofit().create(PatientProfileAPIService.class);
|
||||
|
||||
ProgressDialog progressDialog = new ProgressDialog(context);
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we fetch details for you...");
|
||||
progressDialog.setCancelable(false);
|
||||
if (show_progress) {
|
||||
progressDialog.show();
|
||||
}
|
||||
|
||||
apiService.getUsrProfileProgress("Bearer " + AppUtil.getPatientToken(context))
|
||||
.enqueue(new Callback<CallResponse<PatientData>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<PatientData>> call, Response<CallResponse<PatientData>> response) {
|
||||
progressDialog.dismiss();
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200 || response.body().result == null) {
|
||||
if (callBack != null) callBack.patientData(null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (callBack != null){
|
||||
setPatientData(response.body().result);
|
||||
callBack.patientData(response.body().result);
|
||||
}
|
||||
} else {
|
||||
if (callBack != null) callBack.patientData(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<PatientData>> call, Throwable t) {
|
||||
progressDialog.dismiss();
|
||||
if (callBack != null) callBack.patientData(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface GetPatientCallBack{
|
||||
void patientData(PatientData patientData);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.articles.ArticlesActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.CaregiverChatsFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.DashBoardFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.CgDashBoardFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.fragments.MyPatientFragment;
|
||||
import com.ssb.simplitend.caregiverdashboard.mvvm.CaregiverMainViewModel;
|
||||
import com.ssb.simplitend.cg_subscription.CgSubscriptionActivity;
|
||||
@@ -77,7 +77,7 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
binding.bottomNav.setItemSelectListener(this);
|
||||
|
||||
// initializing dashboard fragment
|
||||
replaceFragment(new DashBoardFragment());
|
||||
replaceFragment(new CgDashBoardFragment());
|
||||
|
||||
setLayoutDetails();
|
||||
|
||||
@@ -173,7 +173,7 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
@Override
|
||||
public void onBottomNavItemSelected(MenuItem selectedItem) {
|
||||
if (selectedItem == MenuItem.DASHBOARD){
|
||||
replaceFragment(new DashBoardFragment());
|
||||
replaceFragment(new CgDashBoardFragment());
|
||||
|
||||
// setting up toolbar accordingly
|
||||
binding.toolbar.setNavigationIcon(AppCompatResources.getDrawable(this, R.drawable.ic_menu));
|
||||
|
||||
@@ -20,6 +20,7 @@ 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.apputils.PatientDataCache;
|
||||
import com.ssb.simplitend.databinding.ActivityPersonalInfoBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
@@ -56,9 +57,27 @@ public class EditProfileInfoActivity extends AppCompatActivity {
|
||||
private ArrayList<String> countryList;
|
||||
private HashMap<String, ArrayList<String>> country_N_states_map;
|
||||
|
||||
public static final String IS_CAREGIVER = "is_caregiver";
|
||||
/*
|
||||
There are total three ways to enter this activity
|
||||
|
||||
private boolean isCaregiver;
|
||||
1. From the caregiver side to edit patient profile
|
||||
where, IS_CAREGIVER value is not passed.
|
||||
thus, default value of isCaregiver is false
|
||||
|
||||
2. From the caregiver side to update Caregivers profile
|
||||
where, IS_CAREGIVER value is passed as true.
|
||||
thus, to update the caregiver data
|
||||
|
||||
In both above cases use the bearer token from the caregiver side
|
||||
|
||||
3. From patient side to update Patients profile
|
||||
where, IS_FROM_PATIENT value is passed as true
|
||||
*/
|
||||
|
||||
public static final String IS_CAREGIVER = "is_caregiver";
|
||||
public static final String IS_FROM_PATIENT = "from_patient";
|
||||
|
||||
private boolean isCaregiver, isFromPatient;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -69,6 +88,7 @@ public class EditProfileInfoActivity extends AppCompatActivity {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null){
|
||||
isCaregiver = intent.getBooleanExtra(IS_CAREGIVER, false);
|
||||
isFromPatient = intent.getBooleanExtra(IS_FROM_PATIENT, false);
|
||||
}
|
||||
|
||||
if (isCaregiver){
|
||||
@@ -80,12 +100,26 @@ public class EditProfileInfoActivity extends AppCompatActivity {
|
||||
|
||||
clickEvents();
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData -> {
|
||||
this.patientData = careGiverData.patientDetails;
|
||||
this.careGiverData = careGiverData;
|
||||
if (isFromPatient){
|
||||
// intent from patient side
|
||||
// thus, fetching the patient cache
|
||||
PatientDataCache.getPatientData(this, (patientData1 -> {
|
||||
this.patientData = patientData1;
|
||||
|
||||
setDetails();
|
||||
}), true);
|
||||
setDetails();
|
||||
}), true);
|
||||
}else{
|
||||
// other possible intent is from caregiver side
|
||||
// thus, fetching caregiver cache
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData -> {
|
||||
if (careGiverData == null) return;
|
||||
|
||||
this.patientData = careGiverData.patientDetails;
|
||||
this.careGiverData = careGiverData;
|
||||
|
||||
setDetails();
|
||||
}), true);
|
||||
}
|
||||
|
||||
binding.name.requestFocus();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class DashBoardFragment extends Fragment implements
|
||||
public class CgDashBoardFragment extends Fragment implements
|
||||
OnMapReadyCallback, ArticleContracts.GetArticleCallback {
|
||||
|
||||
// view binding
|
||||
@@ -53,7 +53,7 @@ public class DashBoardFragment extends Fragment implements
|
||||
|
||||
private PatientData patientData;
|
||||
|
||||
public DashBoardFragment(){
|
||||
public CgDashBoardFragment(){
|
||||
// required empty
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.ssb.simplitend.patient_dashboard;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
|
||||
public class DashBoardActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.ssb.simplitend.patient_dashboard.fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -13,14 +17,45 @@ import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.PatientDataCache;
|
||||
import com.ssb.simplitend.databinding.PatientDashboardFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.activities.WelcomeActivity;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Locale;
|
||||
|
||||
public class PatientDashboardFragment extends Fragment {
|
||||
|
||||
// view binding
|
||||
protected PatientDashboardFragmentBinding binding;
|
||||
|
||||
private PatientData patientData;
|
||||
|
||||
// date suffixes
|
||||
String[] suffixes =
|
||||
// 0 1 2 3 4 5 6 7 8 9
|
||||
{ "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th",
|
||||
// 10 11 12 13 14 15 16 17 18 19
|
||||
"th", "th", "th", "th", "th", "th", "th", "th", "th", "th",
|
||||
// 20 21 22 23 24 25 26 27 28 29
|
||||
"th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th",
|
||||
// 30 31
|
||||
"th", "st" };
|
||||
|
||||
// ticker broadcast receiver that is called every one minute passes the system clock
|
||||
private final BroadcastReceiver timeTickReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent == null) return;
|
||||
|
||||
if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_TIME_TICK)) {
|
||||
updateTime();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public PatientDashboardFragment() {
|
||||
// required
|
||||
}
|
||||
@@ -30,11 +65,39 @@ public class PatientDashboardFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = PatientDashboardFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
PatientDataCache.getPatientData(requireContext(), (patientData -> {
|
||||
this.patientData = patientData;
|
||||
}), true);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateTime();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null){
|
||||
activity.registerReceiver(timeTickReceiver, new IntentFilter(Intent.ACTION_TIME_TICK));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null){
|
||||
activity.unregisterReceiver(timeTickReceiver);
|
||||
}
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.chats.setOnClickListener(v ->
|
||||
Navigation.findNavController(v).navigate(R.id.action_CPDashboardFragment_to_chatListFragment)
|
||||
@@ -51,5 +114,72 @@ public class PatientDashboardFragment extends Fragment {
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
});
|
||||
|
||||
binding.closeReminder.setOnClickListener(v -> removeReminder());
|
||||
|
||||
binding.calls.setOnClickListener(v -> {
|
||||
addReminder();
|
||||
});
|
||||
|
||||
binding.profile.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_CPDashboardFragment_to_patientProfileInfoFragment);
|
||||
});
|
||||
}
|
||||
|
||||
private void updateTime() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("hh:mm a", Locale.getDefault());
|
||||
String currentTime = sdf.format(calendar.getTime());
|
||||
binding.currentTime.setText(currentTime.toUpperCase());
|
||||
|
||||
binding.dayOfWeek.setText(getDayOfWeek(calendar.get(Calendar.DAY_OF_WEEK)));
|
||||
|
||||
SimpleDateFormat date_sdf = new SimpleDateFormat("MMMM dd, yyyy", Locale.getDefault());
|
||||
String date_str = date_sdf.format(calendar.getTime());
|
||||
|
||||
binding.date.setText(date_str);
|
||||
|
||||
}
|
||||
|
||||
public String getDayOfWeek(int position){
|
||||
switch (position){
|
||||
case 1:
|
||||
return "Sunday";
|
||||
case 2:
|
||||
return "Monday";
|
||||
case 3:
|
||||
return "Tuesday";
|
||||
case 4:
|
||||
return "Wednesday";
|
||||
case 5:
|
||||
return "Thursday";
|
||||
case 6:
|
||||
return "Friday";
|
||||
case 7:
|
||||
return "Saturday";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private void removeReminder() {
|
||||
binding.homeReminder.setVisibility(View.GONE);
|
||||
|
||||
ViewGroup.LayoutParams layoutParams = binding.bgImg.getLayoutParams();
|
||||
|
||||
layoutParams.height = (int) getResources().getDimension(com.intuit.sdp.R.dimen._140sdp);
|
||||
|
||||
binding.bgImg.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
private void addReminder(){
|
||||
binding.homeReminder.setVisibility(View.VISIBLE);
|
||||
|
||||
ViewGroup.LayoutParams layoutParams = binding.bgImg.getLayoutParams();
|
||||
|
||||
layoutParams.height = (int) getResources().getDimension(com.intuit.sdp.R.dimen._200sdp);;
|
||||
|
||||
binding.bgImg.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.ssb.simplitend.patient_dashboard.fragments;
|
||||
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.EditProfileInfoActivity.IS_FROM_PATIENT;
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.ACTIVITY_F;
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.CONTACTS_F;
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.MED_INFO_F;
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.MED_REMINDER_F;
|
||||
import static com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.WHICH_FRAGMENT;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.PatientDataCache;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.EditProfileInfoActivity;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity;
|
||||
import com.ssb.simplitend.cg_geofencing.CgGeoFencingActivity;
|
||||
import com.ssb.simplitend.databinding.ActivityPatProfileInfoBinding;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
public class PatientProfileInfoFragment extends Fragment {
|
||||
|
||||
private ActivityPatProfileInfoBinding binding;
|
||||
|
||||
private PatientData patientData;
|
||||
|
||||
public PatientProfileInfoFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = ActivityPatProfileInfoBinding.inflate(inflater, container, false);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
PatientDataCache.getPatientData(requireContext(), (patientData -> {
|
||||
this.patientData = patientData;
|
||||
|
||||
setPatientDetails();
|
||||
}), true);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void setPatientDetails() {
|
||||
if (patientData == null) {
|
||||
Toast.makeText(requireContext(), "Couldn't load patient data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
};
|
||||
|
||||
// if (patientData.p != null) {
|
||||
// // image
|
||||
// Glide.with(this)
|
||||
// .load(AppUtil.IMAGE_BASE_URL + careGiverData.profile_photo)
|
||||
// .placeholder(android.R.color.darker_gray)
|
||||
// .error(R.drawable.ic_contact)
|
||||
// .into(binding.image);
|
||||
// }
|
||||
|
||||
binding.name.setText(patientData.first_name);
|
||||
binding.phoneNumber.setText(patientData.phone_number);
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
|
||||
binding.medication.setOnClickListener(v -> {
|
||||
gotoProfileShower(MED_REMINDER_F);
|
||||
});
|
||||
|
||||
binding.contacts.setOnClickListener(v -> {
|
||||
gotoProfileShower(CONTACTS_F);
|
||||
});
|
||||
|
||||
binding.medRecords.setOnClickListener(v -> {
|
||||
gotoProfileShower(MED_INFO_F);
|
||||
});
|
||||
|
||||
binding.patActivities.setOnClickListener(v -> {
|
||||
gotoProfileShower(ACTIVITY_F);
|
||||
});
|
||||
|
||||
binding.editBtn.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(requireActivity(), EditProfileInfoActivity.class);
|
||||
intent.putExtra(IS_FROM_PATIENT, true);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
}
|
||||
|
||||
private void gotoProfileShower(String which_f) {
|
||||
Intent intent = new Intent(requireActivity(), PatientProfileShowerActivity.class);
|
||||
intent.putExtra(WHICH_FRAGMENT, which_f);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.apputils.PatientDataCache;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.databinding.SignInFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
@@ -152,6 +153,7 @@ public class SignInFragment extends Fragment implements WelcomeContracts.Registe
|
||||
@Override
|
||||
public void onResponse(PatientData patientResult, String token) {
|
||||
// caching user data
|
||||
PatientDataCache.setPatientData(patientResult);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.PatientDataCache;
|
||||
import com.ssb.simplitend.databinding.CreatePinFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
@@ -154,8 +155,7 @@ public class CreatePinFragment extends Fragment implements WelcomeContracts.Regi
|
||||
|
||||
@Override
|
||||
public void onResponse(PatientData patientResult, String token) {
|
||||
Log.d(TAG, "onResponse: " + patientResult);
|
||||
Log.d(TAG, "onResponse: Token " + token);
|
||||
PatientDataCache.setPatientData(patientResult);
|
||||
|
||||
progressDialog.setMessage("Almost there...");
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.location.Address;
|
||||
import android.location.Geocoder;
|
||||
import android.location.Location;
|
||||
@@ -26,6 +27,7 @@ import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
@@ -100,7 +102,7 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
// viewmodel
|
||||
private WelcomeViewModel viewModel;
|
||||
|
||||
public LocationFragment(){
|
||||
public LocationFragment() {
|
||||
// required empty const.
|
||||
}
|
||||
|
||||
@@ -170,8 +172,8 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
SupportMapFragment mapFragment = SupportMapFragment.newInstance(gmo);
|
||||
|
||||
getParentFragmentManager().beginTransaction()
|
||||
.add(R.id.map_frag_cont, mapFragment)
|
||||
.commit();
|
||||
.add(R.id.map_frag_cont, mapFragment)
|
||||
.commit();
|
||||
|
||||
mapFragment.getMapAsync(this);
|
||||
|
||||
@@ -199,7 +201,7 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (editable.toString().length() == 6){
|
||||
if (editable.toString().length() == 6) {
|
||||
binding.zipCode.clearFocus();
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
@@ -212,33 +214,30 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
private void loadPatientAddressSavedState() throws Exception {
|
||||
PatientData patientData = viewModel.getPatientData();
|
||||
|
||||
if (patientData.country != null){
|
||||
if (patientData.country != null) {
|
||||
binding.countrySpinner.selectItemByIndex(countryList.indexOf(patientData.country));
|
||||
|
||||
if (patientData.state != null){
|
||||
if (patientData.state != null) {
|
||||
binding.stateSpinner.selectItemByIndex(country_N_states_map.get(patientData.country).indexOf(patientData.state));
|
||||
}
|
||||
}
|
||||
|
||||
if (patientData.lat != null && patientData.lng != null){
|
||||
if (patientData.lat != null && patientData.lng != null) {
|
||||
double lat = Double.parseDouble(patientData.lat);
|
||||
double lng = Double.parseDouble(patientData.lng);
|
||||
|
||||
currentLocation = new LatLng(lat, lng);
|
||||
}else{
|
||||
// default current location // washington DC
|
||||
currentLocation = new LatLng(40.75796541422796, -73.98557368665934);
|
||||
}
|
||||
|
||||
if (patientData.address_line1 != null){
|
||||
if (patientData.address_line1 != null) {
|
||||
binding.street.setText(patientData.address_line1);
|
||||
}
|
||||
|
||||
if (patientData.city != null){
|
||||
if (patientData.city != null) {
|
||||
binding.town.setText(patientData.city);
|
||||
}
|
||||
|
||||
if (patientData.post_code != null){
|
||||
if (patientData.post_code != null) {
|
||||
binding.zipCode.setText(patientData.post_code);
|
||||
}
|
||||
}
|
||||
@@ -264,8 +263,8 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
// animating camera to selected location
|
||||
CameraPosition camPos = new CameraPosition.Builder()
|
||||
.target(place.getLatLng())
|
||||
.zoom(15)
|
||||
.build();
|
||||
.zoom(15)
|
||||
.build();
|
||||
|
||||
googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(camPos));
|
||||
|
||||
@@ -285,30 +284,30 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
private void clickEvents() {
|
||||
|
||||
binding.backBtn.setOnClickListener(v -> {
|
||||
if (getActivity() != null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().onBackPressed();
|
||||
}
|
||||
});
|
||||
|
||||
binding.submit.setOnClickListener(v ->
|
||||
{
|
||||
if (allOkay()){
|
||||
{
|
||||
if (allOkay()) {
|
||||
|
||||
PatientData patientData = viewModel.getPatientData();
|
||||
PatientData patientData = viewModel.getPatientData();
|
||||
|
||||
patientData.address_line1 = binding.street.getText().toString();
|
||||
patientData.city = binding.town.getText().toString();
|
||||
patientData.post_code = binding.zipCode.getText().toString();
|
||||
patientData.address_line1 = binding.street.getText().toString();
|
||||
patientData.city = binding.town.getText().toString();
|
||||
patientData.post_code = binding.zipCode.getText().toString();
|
||||
|
||||
patientData.country = countryList.get(binding.countrySpinner.getSelectedIndex());
|
||||
patientData.state = country_N_states_map.get(patientData.country).get(binding.stateSpinner.getSelectedIndex());
|
||||
patientData.country = countryList.get(binding.countrySpinner.getSelectedIndex());
|
||||
patientData.state = country_N_states_map.get(patientData.country).get(binding.stateSpinner.getSelectedIndex());
|
||||
|
||||
patientData.lat = String.valueOf(currentLocation.latitude);
|
||||
patientData.lng = String.valueOf(currentLocation.longitude);
|
||||
patientData.lat = String.valueOf(currentLocation.latitude);
|
||||
patientData.lng = String.valueOf(currentLocation.longitude);
|
||||
|
||||
Navigation.findNavController(v).navigate(R.id.action_locationFragment_to_createPinFragment);
|
||||
}
|
||||
}
|
||||
Navigation.findNavController(v).navigate(R.id.action_locationFragment_to_createPinFragment);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
binding.search.setOnClickListener(v -> {
|
||||
@@ -326,32 +325,32 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
private boolean allOkay() {
|
||||
boolean allOkay = true;
|
||||
|
||||
if (binding.street.getText().toString().trim().isEmpty()){
|
||||
if (binding.street.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.street.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.town.getText().toString().trim().isEmpty()){
|
||||
if (binding.town.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.town.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.zipCode.getText().toString().trim().isEmpty()){
|
||||
if (binding.zipCode.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.zipCode.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.countrySpinner.getSelectedIndex() == -1){
|
||||
if (binding.countrySpinner.getSelectedIndex() == -1) {
|
||||
allOkay = false;
|
||||
binding.countrySpinner.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.stateSpinner.getSelectedIndex() == -1){
|
||||
if (binding.stateSpinner.getSelectedIndex() == -1) {
|
||||
allOkay = false;
|
||||
binding.stateSpinner.setError("Required");
|
||||
}
|
||||
|
||||
if (currentLocation == null && allOkay){
|
||||
|
||||
if (currentLocation == null && allOkay) {
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Please click on map to select a location.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -366,26 +365,32 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
|
||||
Boolean fineLocationGranted;
|
||||
|
||||
if (result.containsKey(Manifest.permission.ACCESS_FINE_LOCATION)){
|
||||
if (result.containsKey(Manifest.permission.ACCESS_FINE_LOCATION)) {
|
||||
fineLocationGranted = result.get(Manifest.permission.ACCESS_FINE_LOCATION);
|
||||
}else{
|
||||
} else {
|
||||
fineLocationGranted = false;
|
||||
}
|
||||
|
||||
Boolean coarseLocationGranted;
|
||||
|
||||
if (result.containsKey(Manifest.permission.ACCESS_COARSE_LOCATION)){
|
||||
if (result.containsKey(Manifest.permission.ACCESS_COARSE_LOCATION)) {
|
||||
coarseLocationGranted = result.get(Manifest.permission.ACCESS_COARSE_LOCATION);
|
||||
}else{
|
||||
} else {
|
||||
coarseLocationGranted = false;
|
||||
}
|
||||
|
||||
if ((fineLocationGranted != null && fineLocationGranted) || (coarseLocationGranted != null && coarseLocationGranted)) {
|
||||
// one of the location access granted.
|
||||
Toast.makeText(requireContext(), "Fetching your current location", Toast.LENGTH_SHORT).show();
|
||||
if (googleMap != null) {
|
||||
if (ActivityCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
return;
|
||||
}
|
||||
googleMap.setMyLocationEnabled(true);
|
||||
googleMap.getUiSettings().setMyLocationButtonEnabled(true);
|
||||
}
|
||||
requestLocations();
|
||||
}
|
||||
|
||||
}
|
||||
).launch(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION});
|
||||
}
|
||||
@@ -411,16 +416,17 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
@Override
|
||||
public void onMapReady(@NonNull GoogleMap googleMap) {
|
||||
this.googleMap = googleMap;
|
||||
CameraPosition default_map_pos = new CameraPosition.Builder()
|
||||
.target(currentLocation)
|
||||
.zoom(15)
|
||||
.build();
|
||||
|
||||
googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(default_map_pos));
|
||||
if (ActivityCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
|
||||
googleMap.setMyLocationEnabled(true);
|
||||
googleMap.getUiSettings().setMyLocationButtonEnabled(true);
|
||||
}
|
||||
|
||||
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.75796541422796, -73.98557368665934), 14));
|
||||
|
||||
googleMap.setOnMapClickListener(this);
|
||||
|
||||
if (currentLocation != null){
|
||||
if (currentLocation != null) {
|
||||
addMarker(currentLocation, "Selected location");
|
||||
}
|
||||
}
|
||||
@@ -430,7 +436,7 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
addMarker(latLng, "Selected location");
|
||||
}
|
||||
|
||||
private void addMarker(LatLng latLng, String title){
|
||||
private void addMarker(LatLng latLng, String title) {
|
||||
// updating current location
|
||||
this.currentLocation = latLng;
|
||||
if (marker != null && marker.isVisible()) marker.remove();
|
||||
@@ -444,25 +450,31 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
Geocoder geocoder = new Geocoder(requireContext(), Locale.getDefault());
|
||||
List<Address> addresses = geocoder.getFromLocation(latLng.latitude, latLng.longitude, 1);
|
||||
|
||||
if (addresses != null && addresses.size() > 0 && addresses.get(0) != null){
|
||||
if (addresses != null && addresses.size() > 0 && addresses.get(0) != null) {
|
||||
Address address = addresses.get(0);
|
||||
|
||||
binding.zipCode.setText(address.getPostalCode());
|
||||
|
||||
binding.street.setText(address.getThoroughfare());
|
||||
if (address.getThoroughfare() == null || address.getThoroughfare().isEmpty()) {
|
||||
binding.street.setEnabled(true);
|
||||
binding.street.setText(null);
|
||||
} else {
|
||||
binding.street.setText(address.getThoroughfare());
|
||||
binding.street.setEnabled(false);
|
||||
}
|
||||
|
||||
if (address.getSubLocality() != null){
|
||||
if (address.getSubLocality() != null) {
|
||||
binding.town.setText(address.getSubLocality());
|
||||
}else{
|
||||
} else {
|
||||
binding.town.setText(address.getLocality());
|
||||
}
|
||||
|
||||
if (countryList == null) return;
|
||||
|
||||
if (countryList.contains(address.getCountryName())){
|
||||
if (countryList.contains(address.getCountryName())) {
|
||||
int index = countryList.indexOf(address.getCountryName());
|
||||
|
||||
if (index >= 0 && index < countryList.size()){
|
||||
if (index >= 0 && index < countryList.size()) {
|
||||
binding.countrySpinner.selectItemByIndex(index);
|
||||
|
||||
ArrayList<String> stateList = country_N_states_map.get(address.getCountryName());
|
||||
@@ -471,24 +483,24 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
|
||||
int state_index = stateList.indexOf(address.getAdminArea());
|
||||
|
||||
if (state_index >= 0 && state_index < stateList.size()){
|
||||
if (state_index >= 0 && state_index < stateList.size()) {
|
||||
binding.stateSpinner.selectItemByIndex(state_index);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
binding.countrySpinner.clearSelectedItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
// do nothing as we couldn't load the location from the lat lng
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void requestLocations(){
|
||||
if (!isLocationProviderEnabled(requireContext())){
|
||||
private void requestLocations() {
|
||||
if (!isLocationProviderEnabled(requireContext())) {
|
||||
AppUtil.showAlert(requireContext(),
|
||||
getString(R.string.GPS_ENABLE_REQUIRED),
|
||||
getString(R.string.GPS_ENABLE_MESSAGE),
|
||||
@@ -512,7 +524,6 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
|
||||
public boolean isLocationProviderEnabled(Context context) {
|
||||
LocationManager locationManager = (LocationManager) context.getSystemService(LOCATION_SERVICE);
|
||||
|
||||
return locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
|
||||
}
|
||||
|
||||
@@ -559,17 +570,6 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
|
||||
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);
|
||||
|
||||
@@ -577,14 +577,14 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
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){
|
||||
if (country_N_states_map.containsKey(t1) && country_N_states_map.get(t1) != null) {
|
||||
stateList = country_N_states_map.get(t1);
|
||||
}else{
|
||||
} else {
|
||||
stateList = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
binding.stateSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
binding.stateSpinner.setError(null);
|
||||
binding.zipCode.requestFocus();
|
||||
|
||||
@@ -17,6 +17,7 @@ import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.PatientDataCache;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.apputils.CaregiverDataCache;
|
||||
import com.ssb.simplitend.caregiverdashboard.activities.CaregiverDashActivity;
|
||||
@@ -216,6 +217,7 @@ public class SplashFragment extends Fragment
|
||||
@Override
|
||||
public void onProfileProgressFetched(PatientData patientData) {
|
||||
// caching data
|
||||
PatientDataCache.setPatientData(patientData);
|
||||
|
||||
binding.retry.setVisibility(View.GONE);
|
||||
binding.loadAnim.setVisibility(View.GONE);
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/color_primary"
|
||||
<solid android:color="@color/color_primary_dark"
|
||||
/>
|
||||
|
||||
<corners android:bottomLeftRadius="40dp"
|
||||
android:bottomRightRadius="40dp"/>
|
||||
<corners android:bottomLeftRadius="15dp"
|
||||
android:bottomRightRadius="15dp"/>
|
||||
|
||||
<padding android:bottom="-15dp"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
@@ -91,9 +91,10 @@
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -106,9 +107,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/phone_number"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
499
app/src/main/res/layout/activity_pat_profile_info.xml
Normal file
499
app/src/main/res/layout/activity_pat_profile_info.xml
Normal file
@@ -0,0 +1,499 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:background="@color/white"
|
||||
tools:context=".caregiverdashboard.activities.CaregiverProfileActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<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" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/profile"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:contentDescription="@string/edit_contact"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_edit_outline" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="35dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardCornerRadius="@dimen/_50sdp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="1dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_100sdp"
|
||||
android:layout_height="@dimen/_100sdp"
|
||||
android:contentDescription="@string/onboard_image"
|
||||
android:src="@drawable/ic_contact" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ems="8"
|
||||
android:textAlignment="center"
|
||||
android:ellipsize="end"
|
||||
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
tools:text="@string/aditya_gaikwad"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/call_btn"
|
||||
android:layout_width="@dimen/_30sdp"
|
||||
android:layout_height="@dimen/_30sdp"
|
||||
android:contentDescription="@string/phone_number"
|
||||
android:src="@drawable/ic_phone_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/phone_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
tools:text="@string/_918208401763" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardCornerRadius="8dp"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
android:padding="10dp"
|
||||
|
||||
android:src="@drawable/ic_contacts_2"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/contacts"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_toStartOf="@id/btn_2"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_2"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/medication"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardCornerRadius="8dp"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
android:padding="10dp"
|
||||
|
||||
android:src="@drawable/ic_medication"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/medication"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_toStartOf="@id/btn_3"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_3"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/med_records"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardCornerRadius="8dp"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
android:padding="10dp"
|
||||
|
||||
android:src="@drawable/ic_med_records"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/medical_records"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_toStartOf="@id/btn_4"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_4"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pat_activities"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardCornerRadius="8dp"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
android:padding="10dp"
|
||||
|
||||
android:src="@drawable/ic_pat_activites"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/patient_activities"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_toStartOf="@id/btn_5"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_5"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/freq_used_apps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardCornerRadius="8dp"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_40sdp"
|
||||
android:layout_height="@dimen/_40sdp"
|
||||
|
||||
android:padding="10dp"
|
||||
|
||||
android:src="@drawable/ic_freq_app_2"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/frequently_used_apps"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_toStartOf="@id/btn_6"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_6"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="@color/black" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -141,6 +141,7 @@
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_spinner"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -181,6 +182,7 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/street"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
@@ -194,7 +196,6 @@
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
tools:text="Aditya"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
@@ -206,6 +207,7 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/town"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
@@ -252,6 +254,7 @@
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/state_spinner"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -292,6 +295,7 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/zip_code"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
@@ -3,141 +3,124 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/white_bg">
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="10"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/bg_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_height="@dimen/_200sdp"
|
||||
|
||||
android:background="@drawable/ic_dashboard_cp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="10">
|
||||
android:src="@drawable/ic_dashboard_cp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_head_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="4.5"
|
||||
android:weightSum="10"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/time_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="5.5">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="12 : 00 PM"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/profile"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
|
||||
android:src="@drawable/static_3"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
app:civ_border_color="@color/white_bg"
|
||||
app:civ_border_width="1dp"
|
||||
|
||||
android:elevation="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/notification"
|
||||
|
||||
app:srcCompat="@drawable/ic_notification"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:layout_toStartOf="@id/profile"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/day_of_week"
|
||||
android:id="@+id/current_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Sunday"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="12 : 00 PM"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textSize="@dimen/_22ssp" />
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/profile"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
|
||||
android:src="@drawable/static_3"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
app:civ_border_color="@color/white_bg"
|
||||
app:civ_border_width="1dp"
|
||||
|
||||
android:elevation="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/notification"
|
||||
|
||||
android:text="April 4th, 2023"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/white_bg"
|
||||
app:srcCompat="@drawable/ic_notification"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:layout_toStartOf="@id/profile"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
app:tint="@color/white" />
|
||||
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/day_of_week"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4.5"
|
||||
android:text="Sunday"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="April 4th, 2023"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/white_bg"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_reminder"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
|
||||
app:cardBackgroundColor="@color/color_accent"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp"
|
||||
>
|
||||
|
||||
@@ -155,310 +138,319 @@
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dosage_name"
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
>
|
||||
|
||||
android:text="Vitamin D3"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
<TextView
|
||||
android:id="@+id/dosage_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="Vitamin D3"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:maxEms="5"
|
||||
android:ellipsize="end"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
android:maxLines="1"
|
||||
android:maxEms="5"
|
||||
android:ellipsize="end"
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dosage_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
android:text="2 capsules"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
<TextView
|
||||
android:id="@+id/dosage_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toEndOf="@id/dosage_name"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="2 capsules"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:maxEms="5"
|
||||
android:ellipsize="end"
|
||||
android:layout_toEndOf="@id/dosage_name"
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
/>
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:contentDescription="@string/close"
|
||||
android:maxLines="1"
|
||||
android:maxEms="5"
|
||||
android:ellipsize="end"
|
||||
|
||||
app:srcCompat="@drawable/ic_close_primary"
|
||||
/>
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
<ImageView
|
||||
android:id="@+id/close_reminder"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:contentDescription="@string/close"
|
||||
|
||||
/>
|
||||
app:srcCompat="@drawable/ic_close_primary"
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/head"
|
||||
android:layout_above="@id/sos_btn"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
android:layout_weight="4.5">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
android:weightSum="10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/calls"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="10"
|
||||
android:orientation="horizontal">
|
||||
android:layout_weight="5"
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/calls"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:srcCompat="@drawable/img_doc_contact"/>
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_80sdp"
|
||||
android:layout_height="@dimen/_80sdp"
|
||||
android:contentDescription="@string/calls"
|
||||
android:text="@string/calls"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
app:srcCompat="@drawable/img_doc_contact"/>
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
android:text="@string/calls"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/chats"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_80sdp"
|
||||
android:layout_height="@dimen/_80sdp"
|
||||
android:contentDescription="@string/chats"
|
||||
|
||||
app:srcCompat="@drawable/img_chats"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/chats"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/chats"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="10"
|
||||
android:orientation="horizontal">
|
||||
android:layout_weight="5"
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/chats"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
app:srcCompat="@drawable/img_chats"/>
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_80sdp"
|
||||
android:layout_height="@dimen/_80sdp"
|
||||
android:contentDescription="@string/apps"
|
||||
android:text="@string/chats"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
app:srcCompat="@drawable/img_apps"/>
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
android:text="@string/apps"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_80sdp"
|
||||
android:layout_height="@dimen/_80sdp"
|
||||
android:contentDescription="@string/direction"
|
||||
|
||||
app:srcCompat="@drawable/img_directions"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/direction"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sos_btn"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="15dp"
|
||||
android:text="@string/sos"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/white_bg"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
app:cornerRadius="15dp" />
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
</RelativeLayout>
|
||||
>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/apps"
|
||||
|
||||
app:srcCompat="@drawable/img_apps"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/apps"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/direction"
|
||||
|
||||
app:srcCompat="@drawable/img_directions"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/direction"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sos_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="15dp"
|
||||
android:text="@string/sos"
|
||||
android:textAllCaps="true"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/white_bg"
|
||||
app:backgroundTint="@color/color_primary_dark"
|
||||
app:cornerRadius="25dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
455
app/src/main/res/layout/random.xml
Normal file
455
app/src/main/res/layout/random.xml
Normal file
@@ -0,0 +1,455 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_200sdp"
|
||||
|
||||
android:src="@drawable/ic_dashboard_cp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_head_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/time_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="12 : 00 PM"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textSize="@dimen/_22ssp" />
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/profile"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
|
||||
android:src="@drawable/static_3"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
app:civ_border_color="@color/white_bg"
|
||||
app:civ_border_width="1dp"
|
||||
|
||||
android:elevation="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/notification"
|
||||
|
||||
app:srcCompat="@drawable/ic_notification"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:layout_toStartOf="@id/profile"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
app:tint="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/day_of_week"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Sunday"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="April 4th, 2023"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/white_bg"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_reminder"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
|
||||
app:cardBackgroundColor="@color/color_accent"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="You should take yours medicines in 2 : 24"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dosage_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="Vitamin D3"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:maxLines="1"
|
||||
android:maxEms="5"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dosage_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="2 capsules"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
android:layout_toEndOf="@id/dosage_name"
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:maxLines="1"
|
||||
android:maxEms="5"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close_reminder"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:contentDescription="@string/close"
|
||||
|
||||
app:srcCompat="@drawable/ic_close_primary"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/head"
|
||||
android:layout_above="@id/sos_btn"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<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:weightSum="10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/calls"
|
||||
|
||||
app:srcCompat="@drawable/img_doc_contact"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/calls"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/chats"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/chats"
|
||||
|
||||
app:srcCompat="@drawable/img_chats"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/chats"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/apps"
|
||||
|
||||
app:srcCompat="@drawable/img_apps"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/apps"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/direction"
|
||||
|
||||
app:srcCompat="@drawable/img_directions"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/direction"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sos_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="15dp"
|
||||
android:text="@string/sos"
|
||||
android:textAllCaps="true"
|
||||
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/white_bg"
|
||||
app:backgroundTint="@color/color_primary_dark"
|
||||
app:cornerRadius="25dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -11,6 +11,9 @@
|
||||
<action
|
||||
android:id="@+id/action_CPDashboardFragment_to_chatListFragment"
|
||||
app:destination="@id/chatListFragment" />
|
||||
<action
|
||||
android:id="@+id/action_CPDashboardFragment_to_patientProfileInfoFragment"
|
||||
app:destination="@id/patientProfileInfoFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/chatListFragment"
|
||||
@@ -24,4 +27,8 @@
|
||||
android:id="@+id/chatFragment"
|
||||
android:name="com.ssb.simplitend.patient_dashboard.chats.ChatFragment"
|
||||
android:label="ChatFragment" />
|
||||
<fragment
|
||||
android:id="@+id/patientProfileInfoFragment"
|
||||
android:name="com.ssb.simplitend.patient_dashboard.fragments.PatientProfileInfoFragment"
|
||||
android:label="PatientProfileInfoFragment" />
|
||||
</navigation>
|
||||
Reference in New Issue
Block a user