.
This commit is contained in:
@@ -40,7 +40,7 @@ public class FUAActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_fua);
|
||||
|
||||
swBlock = (SwitchCompat) findViewById(R.id.swBlock);
|
||||
// swBlock = (SwitchCompat) findViewById(R.id.swBlock);
|
||||
rvApps = (RecyclerView) findViewById(R.id.rvApps);
|
||||
rvWhiteApps = (RecyclerView) findViewById(R.id.rv_white_apps);
|
||||
mySharedPref = new MySharedPref(FUAActivity.this);
|
||||
@@ -79,12 +79,12 @@ public class FUAActivity extends AppCompatActivity {
|
||||
rvWhiteApps.setLayoutManager(new GridLayoutManager(this, 4));
|
||||
rvWhiteApps.setAdapter(whiteListAdapter);
|
||||
|
||||
swBlock.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
|
||||
if (!isAccessibilityAppBlockingEnabled() && isChecked) {
|
||||
Intent accessibilityIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
|
||||
startActivity(accessibilityIntent);
|
||||
}
|
||||
// swBlock.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
//
|
||||
// if (!isAccessibilityAppBlockingEnabled() && isChecked) {
|
||||
// Intent accessibilityIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
|
||||
// startActivity(accessibilityIntent);
|
||||
// }
|
||||
//
|
||||
// // Intent serviceIntent = new Intent(getApplicationContext(), service.class);
|
||||
//// ContextCompat.startForegroundService(getApplicationContext(), serviceIntent);
|
||||
@@ -107,7 +107,7 @@ public class FUAActivity extends AppCompatActivity {
|
||||
// stopService(new Intent(MainActivity.this, OverlayService.class));
|
||||
// }*/
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
findViewById(R.id.done_btn).setOnClickListener(v -> {
|
||||
onBackPressed();
|
||||
@@ -162,7 +162,7 @@ public class FUAActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
swBlock.setChecked(isAccessibilityAppBlockingEnabled());
|
||||
// swBlock.setChecked(isAccessibilityAppBlockingEnabled());
|
||||
}
|
||||
|
||||
private List<AppList> getInstalledApps() {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class MySharedPref {
|
||||
public void setArrayList(String key, ArrayList<String> list) {
|
||||
Set<String> set = new HashSet<>(list);
|
||||
prefsEditor.putStringSet(key, set);
|
||||
prefsEditor.commit();
|
||||
prefsEditor.apply();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -49,56 +49,66 @@ public class ContactListAdapter extends ListAdapter<ArrayList<Contact>, ContactL
|
||||
|
||||
ArrayList<Contact> contacts = getItem(position);
|
||||
|
||||
if (contacts == null || contacts.isEmpty()) return;
|
||||
|
||||
holder.binding.name.setLifecycleOwner(holder.binding.name.getLifecycleOwner());
|
||||
holder.binding.name.setDismissWhenNotifiedItemSelected(true);
|
||||
holder.binding.name.setIsFocusable(true);
|
||||
|
||||
if (contacts.size() > 1){
|
||||
// need to show dropdown menu
|
||||
ArrayList<String> phone_list = new ArrayList<>();
|
||||
|
||||
for (Contact contact :
|
||||
contacts) {
|
||||
if (contact.first_name == null) return;
|
||||
|
||||
phone_list.add(contact.phone_number);
|
||||
}
|
||||
|
||||
holder.binding.name.setItems(phone_list);
|
||||
|
||||
}
|
||||
|
||||
holder.binding.name.setOnClickListener(v -> {
|
||||
if (contactClickListener != null){
|
||||
|
||||
if (contacts.size() == 1){
|
||||
// only one item
|
||||
contactClickListener.onClick(contacts.get(0));
|
||||
}else{
|
||||
// more than one item
|
||||
// thus, show dropdown menu
|
||||
holder.binding.name.show();
|
||||
}
|
||||
if (contactClickListener != null && contacts != null){
|
||||
Contact contact = new Contact(contacts);
|
||||
|
||||
contactClickListener.onClick(contact);
|
||||
}
|
||||
});
|
||||
|
||||
holder.binding.name.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
// below code is about showing a dropdown of multiple contact number menu when user clicks on one of the contact
|
||||
|
||||
if (i1 >= contacts.size()) return;
|
||||
|
||||
Contact contact = contacts.get(i1);
|
||||
|
||||
if (contact != null){
|
||||
holder.binding.name.setText(contact.first_name);
|
||||
|
||||
if (contactClickListener != null){
|
||||
contactClickListener.onClick(contact);
|
||||
}
|
||||
}
|
||||
});
|
||||
// if (contacts == null || contacts.isEmpty()) return;
|
||||
//
|
||||
// holder.binding.name.setLifecycleOwner(holder.binding.name.getLifecycleOwner());
|
||||
// holder.binding.name.setDismissWhenNotifiedItemSelected(true);
|
||||
// holder.binding.name.setIsFocusable(true);
|
||||
//
|
||||
// if (contacts.size() > 1){
|
||||
// // need to show dropdown menu
|
||||
// ArrayList<String> phone_list = new ArrayList<>();
|
||||
//
|
||||
// for (Contact contact :
|
||||
// contacts) {
|
||||
// if (contact.first_name == null) return;
|
||||
//
|
||||
// phone_list.add(contact.phone_number);
|
||||
// }
|
||||
//
|
||||
// holder.binding.name.setItems(phone_list);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// holder.binding.name.setOnClickListener(v -> {
|
||||
// if (contactClickListener != null){
|
||||
//
|
||||
// if (contacts.size() == 1){
|
||||
// // only one item
|
||||
// contactClickListener.onClick(contacts.get(0));
|
||||
// }else{
|
||||
// // more than one item
|
||||
// // thus, show dropdown menu
|
||||
// holder.binding.name.show();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// holder.binding.name.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
//
|
||||
// if (i1 >= contacts.size()) return;
|
||||
//
|
||||
// Contact contact = contacts.get(i1);
|
||||
//
|
||||
// if (contact != null){
|
||||
// holder.binding.name.setText(contact.first_name);
|
||||
//
|
||||
// if (contactClickListener != null){
|
||||
// contactClickListener.onClick(contact);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
public void setContactClickListener(OnContactClickListener contactClickListener) {
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.ListAdapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.databinding.CreateContactViewHolderBinding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class CreateContactAdapter extends ListAdapter<String, CreateContactAdapter.CreateContactViewHolder> {
|
||||
|
||||
private static final DiffUtil.ItemCallback<String> DIFF_UTIL = new DiffUtil.ItemCallback<String>() {
|
||||
@Override
|
||||
public boolean areItemsTheSame(@NonNull String oldItem, @NonNull String newItem) {
|
||||
return oldItem.equals(newItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areContentsTheSame(@NonNull String oldItem, @NonNull String newItem) {
|
||||
return oldItem.equals(newItem);
|
||||
}
|
||||
};
|
||||
|
||||
private final ArrayList<String> countryCodeList;
|
||||
@NonNull
|
||||
private final List<String> changedContactList;
|
||||
|
||||
@NonNull
|
||||
private String default_phone_number;
|
||||
|
||||
public CreateContactAdapter(@NonNull ArrayList<String> countryCodeList, @NonNull String default_phone_number){
|
||||
super(DIFF_UTIL);
|
||||
this.countryCodeList = countryCodeList;
|
||||
this.default_phone_number = default_phone_number;
|
||||
this.changedContactList = new LinkedList<>();
|
||||
}
|
||||
|
||||
public void setDefault_phone_number(@NonNull String default_phone_number) {
|
||||
this.default_phone_number = default_phone_number;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public CreateContactViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
CreateContactViewHolderBinding binding = CreateContactViewHolderBinding.inflate(
|
||||
LayoutInflater.from(parent.getContext()),
|
||||
parent, false);
|
||||
|
||||
binding.countryCodes.setItems(countryCodeList);
|
||||
binding.countryCodes.setIsFocusable(true);
|
||||
binding.countryCodes.setDismissWhenNotifiedItemSelected(true);
|
||||
|
||||
return new CreateContactViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull CreateContactViewHolder holder, int position) {
|
||||
holder.binding.phoneNumber.setText("");
|
||||
|
||||
if (position < 0 || position >= getItemCount()) return;
|
||||
|
||||
// input formatter for phone number
|
||||
InputFilter phoneFilter = (charSequence, i, i1, spanned, i2, i3) -> {
|
||||
String some = holder.binding.phoneNumber.getText().toString();
|
||||
String phone_number_str = charSequence.toString();
|
||||
|
||||
String country_code = null;
|
||||
|
||||
if (holder.binding.countryCodes.getSelectedIndex() != -1) {
|
||||
country_code = countryCodeList.get(holder.binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(charSequence, "US");
|
||||
|
||||
phone_number_str = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (country_code != null && !countryCodeList.contains(country_code)) {
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
if (country_code != null) {
|
||||
holder.binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(country_code));
|
||||
}
|
||||
|
||||
if (phone_number_str.length() > 10) {
|
||||
// pasted number length is greater than 10
|
||||
return phone_number_str.substring(0, 10);
|
||||
}
|
||||
|
||||
String total_phone_number = holder.binding.phoneNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10) {
|
||||
// max length should be 10
|
||||
return "";
|
||||
} else {
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
holder.binding.phoneNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
|
||||
// Now setting the phone number and it will be automatically formatted with above filter
|
||||
holder.binding.phoneNumber.setText(getItem(position));
|
||||
|
||||
if (default_phone_number.equals(getItem(position))){
|
||||
holder.binding.defaultCheck.setSelected(true);
|
||||
}else{
|
||||
holder.binding.defaultCheck.setSelected(false);
|
||||
}
|
||||
|
||||
holder.binding.defaultCheck.setOnClickListener(v -> {
|
||||
if (!default_phone_number.equals(getItem(position))){
|
||||
default_phone_number = getItem(position);
|
||||
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void submitList(@Nullable List<String> list) {
|
||||
super.submitList(list);
|
||||
if (list != null){
|
||||
this.changedContactList.clear();
|
||||
this.changedContactList.addAll(list);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CreateContactViewHolder extends RecyclerView.ViewHolder{
|
||||
public CreateContactViewHolderBinding binding;
|
||||
|
||||
public CreateContactViewHolder(@NonNull CreateContactViewHolderBinding binding){
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.InputFilter;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -24,13 +23,11 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.github.dhaval2404.imagepicker.ImagePicker;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.google.i18n.phonenumbers.NumberParseException;
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.CreateEditContactFragmentBinding;
|
||||
@@ -42,6 +39,7 @@ import com.ssb.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -87,6 +85,8 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
// Remote contact list
|
||||
protected List<ContactListResponse> contactList;
|
||||
|
||||
private CreateContactAdapter createContactAdapter;
|
||||
|
||||
public CreateContactFragment() {
|
||||
// required empty const.
|
||||
}
|
||||
@@ -113,69 +113,17 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
|
||||
// country code loading
|
||||
countryCodeList = contactViewModel.loadCountryCodeDropDown(requireContext());
|
||||
|
||||
binding.countryCodes.setLifecycleOwner(this);
|
||||
|
||||
binding.countryCodes.setItems(countryCodeList);
|
||||
|
||||
if (contactList == null) contactList = new ArrayList<>();
|
||||
if (!countryCodeList.contains("+1")) {
|
||||
countryCodeList.add("+1");
|
||||
}
|
||||
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf("+1"));
|
||||
|
||||
binding.countryCodes.setDismissWhenNotifiedItemSelected(true);
|
||||
|
||||
binding.countryCodes.setIsFocusable(true);
|
||||
createContactAdapter = new CreateContactAdapter(countryCodeList, "");
|
||||
binding.contactRv.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
binding.contactRv.setAdapter(createContactAdapter);
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
// phone number formatting
|
||||
// to deal with input pasting in the edit text
|
||||
InputFilter phoneFilter = (charSequence, i, i1, spanned, i2, i3) -> {
|
||||
String phone_number_str = charSequence.toString();
|
||||
|
||||
String country_code = null;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() != -1) {
|
||||
country_code = countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(charSequence, "US");
|
||||
|
||||
phone_number_str = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (country_code != null && !countryCodeList.contains(country_code)) {
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
if (country_code != null) {
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(country_code));
|
||||
}
|
||||
|
||||
if (phone_number_str.length() > 10) {
|
||||
// pasted number length is greater than 10
|
||||
return phone_number_str.substring(0, 10);
|
||||
}
|
||||
|
||||
String total_phone_number = binding.phoneNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10) {
|
||||
// max length should be 10
|
||||
return "";
|
||||
} else {
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
binding.phoneNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle != null) {
|
||||
@@ -286,10 +234,7 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
RequestBody user_first_name = RequestBody.create(binding.name.getText().toString().trim(), MediaType.parse("text/plain;charset=utf-8"));
|
||||
body.put("full_name", user_first_name);
|
||||
|
||||
String contact_number = countryCodeList.get(binding.countryCodes.getSelectedIndex()) + " " +
|
||||
binding.phoneNumber.getText().toString();
|
||||
|
||||
RequestBody contact_number_part = RequestBody.create(contact_number, MediaType.parse("text/plain;charset=utf-8"));
|
||||
RequestBody contact_number_part = RequestBody.create("contact_number", MediaType.parse("text/plain;charset=utf-8"));
|
||||
|
||||
body.put("contact_number", contact_number_part);
|
||||
|
||||
@@ -333,57 +278,43 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
binding.name.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.phoneNumber.getText().toString().trim().isEmpty() ||
|
||||
binding.phoneNumber.getText().toString().trim().length() < 10) {
|
||||
allOkay = false;
|
||||
binding.phoneNumber.setError("Invalid");
|
||||
}else if (binding.countryCodes.getSelectedIndex() == -1||
|
||||
binding.countryCodes.getSelectedIndex() >= countryCodeList.size()){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Select a coutnry code.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else{
|
||||
// validating phone number
|
||||
try {
|
||||
Phonenumber.PhoneNumber phone_number = PhoneNumberUtil.getInstance().parse(countryCodeList.get(binding.countryCodes.getSelectedIndex())+
|
||||
binding.phoneNumber.getText().toString(), "US");
|
||||
|
||||
if (!PhoneNumberUtil.getInstance().isValidNumber(phone_number)) {
|
||||
binding.phoneNumber.setError("Invalid phone number");
|
||||
allOkay = false;
|
||||
}
|
||||
} catch (NumberParseException e) {
|
||||
// do nothing as we couldn't validate phone number
|
||||
}
|
||||
}
|
||||
// if (binding.phoneNumber.getText().toString().trim().isEmpty() ||
|
||||
// binding.phoneNumber.getText().toString().trim().length() < 10) {
|
||||
// allOkay = false;
|
||||
// binding.phoneNumber.setError("Invalid");
|
||||
// }else if (binding.countryCodes.getSelectedIndex() == -1||
|
||||
// binding.countryCodes.getSelectedIndex() >= countryCodeList.size()){
|
||||
// allOkay = false;
|
||||
// Toast.makeText(requireContext(), "Select a coutnry code.", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
// else{
|
||||
// // validating phone number
|
||||
// try {
|
||||
// Phonenumber.PhoneNumber phone_number = PhoneNumberUtil.getInstance().parse(countryCodeList.get(binding.countryCodes.getSelectedIndex())+
|
||||
// binding.phoneNumber.getText().toString(), "US");
|
||||
//
|
||||
// if (!PhoneNumberUtil.getInstance().isValidNumber(phone_number)) {
|
||||
// binding.phoneNumber.setError("Invalid phone number");
|
||||
// allOkay = false;
|
||||
// }
|
||||
// } catch (NumberParseException e) {
|
||||
// // do nothing as we couldn't validate phone number
|
||||
// }
|
||||
// }
|
||||
|
||||
if (mustBeeCaregiver && binding.email.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.email.setError("Required");
|
||||
}
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() == -1 && allOkay) {
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "please select a country code", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
// if (binding.countryCodes.getSelectedIndex() == -1 && allOkay) {
|
||||
// allOkay = false;
|
||||
// Toast.makeText(requireContext(), "please select a country code", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
|
||||
return allOkay;
|
||||
}
|
||||
|
||||
private boolean phoneAlreadyAdded() {
|
||||
|
||||
for (ContactListResponse contact : contactList) {
|
||||
String contact_number = countryCodeList.get(binding.countryCodes.getSelectedIndex()) + " " +
|
||||
binding.phoneNumber.getText().toString();
|
||||
|
||||
if (contact.contact_data.phone_number.equals(contact_number)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gotoAddFragment(BottomSheetDialog bsd) {
|
||||
new Handler().postDelayed(() -> {
|
||||
@@ -528,6 +459,9 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
}
|
||||
|
||||
private void setDetails() {
|
||||
if (contactData == null){
|
||||
return;
|
||||
}
|
||||
|
||||
if (contactData.contact_photo != null) {
|
||||
Glide.with(requireContext())
|
||||
@@ -542,10 +476,6 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
binding.name.setText(contactData.first_name);
|
||||
}
|
||||
|
||||
if (contactData.phone_number != null){
|
||||
binding.phoneNumber.setText(contactData.phone_number);
|
||||
}
|
||||
|
||||
if (contactData.email_address != null)
|
||||
binding.email.setText(contactData.email_address);
|
||||
|
||||
@@ -561,12 +491,6 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
binding.email.setClickable(false);
|
||||
binding.email.setFocusable(false);
|
||||
|
||||
binding.phoneNumber.setClickable(false);
|
||||
binding.phoneNumber.setFocusable(false);
|
||||
|
||||
binding.countryCodes.setClickable(false);
|
||||
binding.countryCodes.setFocusable(false);
|
||||
|
||||
binding.caregiverCheck.setChecked(true);
|
||||
binding.caregiverCheck.setEnabled(false);
|
||||
binding.relationship.setEnabled(false);
|
||||
@@ -574,6 +498,12 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
binding.caregiverCheckView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// adding contacts to Contact_rv
|
||||
if (contactData.extra_phone_numbers != null && !contactData.extra_phone_numbers.isEmpty()){
|
||||
String[] phone_numbers = contactData.extra_phone_numbers.split(",");
|
||||
createContactAdapter.submitList(Arrays.asList(phone_numbers));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setLayoutDetails(String title, String photo_title, String btn_txt) {
|
||||
@@ -582,4 +512,4 @@ public class CreateContactFragment extends Fragment implements WelcomeContracts.
|
||||
binding.nextBtn.setText(btn_txt);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,12 @@ package com.ssb.simplitend.welcome.welcomepatient.fragments.contacts.mvvm;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Contact implements Serializable {
|
||||
|
||||
public String first_name, imageUri, phone_number, relationship, email_address;
|
||||
public String first_name, imageUri, phone_number, relationship, email_address
|
||||
, extra_phone_numbers;
|
||||
|
||||
public String is_sos, updated_at, created_at;
|
||||
|
||||
@@ -16,7 +17,27 @@ public class Contact implements Serializable {
|
||||
|
||||
public long id;
|
||||
|
||||
public Contact(){}
|
||||
public Contact(ArrayList<Contact> contacts){
|
||||
if (contacts != null && !contacts.isEmpty()){
|
||||
this.first_name = contacts.get(0).first_name;
|
||||
this.email_address = contacts.get(0).email_address;
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < contacts.size(); i++) {
|
||||
if (contacts.get(i) != null){
|
||||
stringBuilder.append(contacts.get(i).phone_number);
|
||||
|
||||
// adding comma only if it is not the last item
|
||||
if (i < contacts.size()-1){
|
||||
stringBuilder.append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.extra_phone_numbers = stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public Contact(String name){
|
||||
this.first_name = first_name;
|
||||
@@ -27,6 +48,8 @@ public class Contact implements Serializable {
|
||||
this.phone_number = phoneNumber;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Contact(String first_name, String phone_number, String relationship, String email_address, String is_sos, String updated_at, String created_at) {
|
||||
this.first_name = first_name;
|
||||
this.phone_number = phone_number;
|
||||
|
||||
@@ -17,6 +17,8 @@ public class ContactData implements Serializable {
|
||||
public String contact_photo;
|
||||
public CareGiverData care_giver_data;
|
||||
|
||||
public String extra_phone_numbers;
|
||||
|
||||
public int contact_id;
|
||||
|
||||
public ContactData() {
|
||||
@@ -26,6 +28,7 @@ public class ContactData implements Serializable {
|
||||
this.first_name = contact.first_name;
|
||||
this.phone_number = contact.phone_number;
|
||||
this.email_address = contact.email_address;
|
||||
this.extra_phone_numbers = contact.extra_phone_numbers;
|
||||
}
|
||||
|
||||
public ContactData(int id) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
@@ -329,29 +330,37 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
private boolean allOkay() {
|
||||
boolean allOkay = true;
|
||||
|
||||
if (binding.street.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.street.setError("Required");
|
||||
}
|
||||
// if (binding.street.getText().toString().trim().isEmpty()) {
|
||||
// allOkay = false;
|
||||
// binding.street.setError("Required");
|
||||
// }
|
||||
|
||||
if (binding.town.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.town.setError("Required");
|
||||
// allOkay = false;
|
||||
// binding.town.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (binding.zipCode.getText().toString().trim().isEmpty()) {
|
||||
allOkay = false;
|
||||
binding.zipCode.setError("Required");
|
||||
// allOkay = false;
|
||||
// binding.zipCode.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (binding.countrySpinner.getSelectedIndex() == -1) {
|
||||
allOkay = false;
|
||||
binding.countrySpinner.setError("Required");
|
||||
// allOkay = false;
|
||||
// binding.countrySpinner.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (binding.stateSpinner.getSelectedIndex() == -1) {
|
||||
allOkay = false;
|
||||
binding.stateSpinner.setError("Required");
|
||||
// allOkay = false;
|
||||
// binding.stateSpinner.setError("Required");
|
||||
Toast.makeText(requireContext(), "Select a valid location.", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentLocation == null && allOkay) {
|
||||
@@ -449,6 +458,7 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
.position(latLng).draggable(false)
|
||||
.title(title));
|
||||
|
||||
|
||||
try {
|
||||
// fetching address from the lag lng
|
||||
Geocoder geocoder = new Geocoder(requireContext(), Locale.getDefault());
|
||||
@@ -460,11 +470,9 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
binding.zipCode.setText(address.getPostalCode());
|
||||
|
||||
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) {
|
||||
@@ -495,12 +503,21 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
binding.countrySpinner.clearSelectedItem();
|
||||
}
|
||||
|
||||
}else{
|
||||
binding.countrySpinner.clearSelectedItem();
|
||||
binding.street.setText(null);
|
||||
binding.stateSpinner.clearSelectedItem();
|
||||
binding.zipCode.setText(null);
|
||||
binding.town.setText(null);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// do nothing as we couldn't load the location from the lat lng
|
||||
}
|
||||
|
||||
binding.street.clearFocus();
|
||||
binding.scrollView.fullScroll(ScrollView.FOCUS_DOWN);
|
||||
|
||||
}
|
||||
|
||||
private void requestLocations() {
|
||||
@@ -597,23 +614,23 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
binding.stateSpinner.clearSelectedItem();
|
||||
}
|
||||
|
||||
binding.street.requestFocus();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().getWindow()
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
// binding.street.requestFocus();
|
||||
//
|
||||
// if (getActivity() != null) {
|
||||
// getActivity().getWindow()
|
||||
// .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
// }
|
||||
});
|
||||
|
||||
binding.stateSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
binding.stateSpinner.setError(null);
|
||||
binding.zipCode.requestFocus();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().getWindow()
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
});
|
||||
// binding.stateSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
// binding.stateSpinner.setError(null);
|
||||
// binding.zipCode.requestFocus();
|
||||
//
|
||||
// if (getActivity() != null) {
|
||||
// getActivity().getWindow()
|
||||
// .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<size android:height="@dimen/_25sdp"
|
||||
android:width="@dimen/_25sdp"/>
|
||||
<size android:height="25dp"
|
||||
android:width="25dp"/>
|
||||
|
||||
<solid android:color="@color/color_primary"
|
||||
/>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<size android:height="@dimen/_25sdp"
|
||||
android:width="@dimen/_25sdp"/>
|
||||
<size android:height="25dp"
|
||||
android:width="25dp"/>
|
||||
|
||||
<solid android:color="@color/white"
|
||||
/>
|
||||
|
||||
@@ -42,74 +42,61 @@
|
||||
android:layout_marginHorizontal="15dp"
|
||||
>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swBlock"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:checked="false"
|
||||
android:text="Block the app"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/swBlock">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_white_apps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="5"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_white_list" />
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:id="@+id/view"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="1dp"-->
|
||||
<!-- android:layout_marginHorizontal="10dp"-->
|
||||
<!-- android:layout_marginVertical="10dp"-->
|
||||
<!-- android:background="@color/black_10"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/rv_white_apps" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/all_app_tile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_white_apps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_white_list" />
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/all_apps"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@color/black_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_white_apps" />
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/all_app_tile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvApps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="5"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:nestedScrollingEnabled="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||
|
||||
android:text="@string/all_apps"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvApps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:nestedScrollingEnabled="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
100
app/src/main/res/layout/create_contact_view_holder.xml
Normal file
100
app/src/main/res/layout/create_contact_view_holder.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="0dp"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
android:contentDescription="@string/phone_number"
|
||||
android:src="@drawable/ic_phone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_codes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14.5sp"
|
||||
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
app:spinner_arrow_animate="true"
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
app:spinner_popup_max_height="200dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone_number"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:autofillHints="phone"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
android:ems="11"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/phone_number"
|
||||
android:inputType="number"
|
||||
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/default_check"
|
||||
app:layout_constraintStart_toEndOf="@+id/country_codes"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/default_check"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@drawable/sub_check_drawable"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView 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"
|
||||
@@ -128,99 +128,139 @@
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/contact_number"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:baselineAligned="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/phone_number"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
android:src="@drawable/ic_phone"
|
||||
android:layout_marginVertical="10dp"/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_codes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:padding="10dp"
|
||||
android:text="@string/contact_number"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14.5sp"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginVertical="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
android:hint="@string/phone_number"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
/>
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:autofillHints="phone"
|
||||
android:inputType="number"
|
||||
android:text="@string/select_default_contact"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contact_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginHorizontal="15dp"-->
|
||||
<!-- android:layout_marginVertical="10dp"-->
|
||||
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
|
||||
<!-- android:background="@drawable/edit_text_bg_2"-->
|
||||
<!-- >-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/imageView2"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginVertical="10dp"-->
|
||||
|
||||
<!-- android:layout_marginStart="10dp"-->
|
||||
<!-- android:contentDescription="@string/phone_number"-->
|
||||
<!-- android:src="@drawable/ic_phone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <com.skydoves.powerspinner.PowerSpinnerView-->
|
||||
<!-- android:id="@+id/country_codes"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
|
||||
<!-- android:background="@color/white_bg"-->
|
||||
|
||||
<!-- android:gravity="center"-->
|
||||
|
||||
<!-- android:padding="10dp"-->
|
||||
<!-- android:textColor="@color/black"-->
|
||||
<!-- android:textSize="14.5sp"-->
|
||||
|
||||
<!-- app:fontFamily="@font/nunito_regular"-->
|
||||
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/imageView2"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
|
||||
<!-- app:spinner_arrow_animate="true"-->
|
||||
<!-- app:spinner_arrow_drawable="@drawable/ic_down"-->
|
||||
<!-- app:spinner_arrow_gravity="end"-->
|
||||
<!-- app:spinner_arrow_padding="8dp"-->
|
||||
<!-- app:spinner_divider_color="@color/black"-->
|
||||
<!-- app:spinner_divider_show="true"-->
|
||||
<!-- app:spinner_divider_size="0.4dp"-->
|
||||
<!-- app:spinner_item_height="46dp"-->
|
||||
<!-- app:spinner_popup_animation="dropdown"-->
|
||||
<!-- app:spinner_popup_background="@drawable/edit_text_bg_2"-->
|
||||
<!-- app:spinner_popup_elevation="14dp"-->
|
||||
<!-- app:spinner_popup_max_height="200dp" />-->
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/phone_number"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginEnd="10dp"-->
|
||||
|
||||
<!-- android:autofillHints="phone"-->
|
||||
|
||||
<!-- android:background="@android:color/transparent"-->
|
||||
<!-- android:ems="11"-->
|
||||
<!-- android:fontFamily="@font/nunito_regular"-->
|
||||
<!-- android:hint="@string/phone_number"-->
|
||||
<!-- android:inputType="number"-->
|
||||
|
||||
<!-- android:padding="10dp"-->
|
||||
<!-- android:paddingVertical="15dp"-->
|
||||
|
||||
<!-- android:textAppearance="@style/TextAppearance.Material3.TitleMedium"-->
|
||||
|
||||
<!-- android:textColor="@color/black"-->
|
||||
<!-- android:textColorHint="@android:color/darker_gray"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/check"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/country_codes"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageButton-->
|
||||
<!-- android:id="@+id/check"-->
|
||||
<!-- android:layout_width="25dp"-->
|
||||
<!-- android:layout_height="25dp"-->
|
||||
<!-- android:layout_marginEnd="10dp"-->
|
||||
<!-- android:src="@drawable/sub_check_drawable"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -356,4 +396,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="20dp"
|
||||
@@ -57,13 +57,13 @@
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/map_frag_cont"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_300sdp"
|
||||
android:layout_height="@dimen/_350sdp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/trans_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_300sdp"
|
||||
android:layout_height="@dimen/_350sdp"
|
||||
android:background="@android:color/transparent"
|
||||
/>
|
||||
|
||||
@@ -106,239 +106,254 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_address"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:focusable="false"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<ImageView
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_home"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_spinner"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:text="@string/home_address"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
/>
|
||||
|
||||
android:hint="@string/enter_your_country"
|
||||
android:textColorHint="#A1A1A1"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
android:orientation="horizontal"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:focusable="false"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
app:srcCompat="@drawable/ic_home"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_spinner"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_your_country"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:drawableTint="@color/white"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/street"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_street"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<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"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_town"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_home"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/state_spinner"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_your_state"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:drawableTint="@color/white"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/zip_code"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_zip_code"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:maxLength="6"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="number"
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:text="@string/submit"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
|
||||
android:drawableEnd="@drawable/ic_forward_error"
|
||||
android:drawablePadding="15dp"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_viwe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_street"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<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"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_town"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_home"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/state_spinner"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_your_state"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/zip_code"
|
||||
android:enabled="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_zip_code"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="5dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_home"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:maxLength="6"
|
||||
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="number"
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:text="@string/submit"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
|
||||
android:drawableEnd="@drawable/ic_forward_error"
|
||||
android:drawablePadding="15dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -1,455 +1,99 @@
|
||||
<?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">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/head"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_200sdp"
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="0dp"
|
||||
|
||||
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"
|
||||
>
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/time_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
>
|
||||
android:layout_marginStart="10dp"
|
||||
android:contentDescription="@string/phone_number"
|
||||
android:src="@drawable/ic_phone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<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"
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_codes"
|
||||
android:layout_width="0dp"
|
||||
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">
|
||||
android:background="@color/white_bg"
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14.5sp"
|
||||
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center">
|
||||
app:spinner_arrow_animate="true"
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
app:spinner_popup_max_height="200dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_60sdp"
|
||||
android:layout_height="@dimen/_60sdp"
|
||||
android:contentDescription="@string/calls"
|
||||
<EditText
|
||||
android:id="@+id/phone_number"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:srcCompat="@drawable/img_doc_contact"/>
|
||||
android:autofillHints="phone"
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:ems="11"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/phone_number"
|
||||
android:inputType="number"
|
||||
|
||||
android:text="@string/calls"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
/>
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/country_codes"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/sub_check_drawable"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/phone_number"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</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" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -58,10 +58,10 @@
|
||||
<string name="optional">(optional)</string>
|
||||
<string name="i_accept_terms_and_conditions">I accept terms and conditions</string>
|
||||
<string name="next">Next</string>
|
||||
<string name="choose_on_map">Enter your address</string>
|
||||
<string name="choose_on_map">Find your address</string>
|
||||
<string name="drag_the_map_and_choose_the_place">Drag the map and choose the place</string>
|
||||
<string name="map_view">Map view</string>
|
||||
<string name="home_address">Home address</string>
|
||||
<string name="home_address">Confirm your Home address</string>
|
||||
<string name="enter_your_street">Enter your street</string>
|
||||
<string name="enter_your_town">Enter your town</string>
|
||||
<string name="enter_your_state">Enter your state</string>
|
||||
@@ -386,5 +386,6 @@
|
||||
<string name="accessibility_service_description">accessibility_service_description</string>
|
||||
<string name="default_notification_channel_id">ForegroundServiceChannel</string>
|
||||
<string name="all_apps">All apps</string>
|
||||
<string name="select_default_contact">(Select default contact)</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user