.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -35,6 +37,9 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.firebase:firebase-crashlytics:18.3.2'
|
||||
implementation 'com.google.firebase:firebase-analytics:21.2.0'
|
||||
|
||||
|
||||
// Navigation component
|
||||
def nav_version = "2.5.3"
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg;
|
||||
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.PartMap;
|
||||
|
||||
public interface WelcomeApiService {
|
||||
|
||||
@Multipart
|
||||
@POST("api/auth/caregiver-register")
|
||||
Call<CallResponse<CareGiverData>> registerCareGiver(@PartMap Map<String, RequestBody> body);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg;
|
||||
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
|
||||
public interface WelcomeContracts {
|
||||
|
||||
interface RegisterCareGiverCallback{
|
||||
|
||||
void onCareGiverRegistered(CareGiverData careGiverData);
|
||||
|
||||
void onRegisterFailed(Throwable t, String message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ssb.simplitend.databinding.CgChangePasswordFragmentBinding;
|
||||
|
||||
public class CgChangePwdFragment extends Fragment {
|
||||
|
||||
protected CgChangePasswordFragmentBinding binding;
|
||||
|
||||
public CgChangePwdFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgChangePasswordFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.CgCheckEmailFragmentBinding;
|
||||
|
||||
public class CgCheckEmailFragment extends Fragment {
|
||||
|
||||
protected CgCheckEmailFragmentBinding binding;
|
||||
|
||||
public CgCheckEmailFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgCheckEmailFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.submit.setOnClickListener(view -> {
|
||||
Navigation.findNavController(view)
|
||||
.navigate(R.id.action_cgCheckEmailFragment_to_cgChangePwdFragment);
|
||||
});
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
// showing gif
|
||||
Glide.with(binding.image)
|
||||
.asGif()
|
||||
.load(R.raw.email_sending_anim)
|
||||
.placeholder(R.drawable.forgot_pin_email_img)
|
||||
.into(binding.image);
|
||||
|
||||
initOTPBoxes();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
setting text change listener for every edit text for otp
|
||||
*/
|
||||
private void initOTPBoxes() {
|
||||
|
||||
binding.otp1.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
binding.otp2.requestFocus();
|
||||
if (checkOTPInputs()){
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
}
|
||||
|
||||
// check if all otp boxes are filled
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
binding.otp2.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
binding.otp3.requestFocus();
|
||||
if (checkOTPInputs()){
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
} else {
|
||||
binding.otp1.requestFocus();
|
||||
}
|
||||
|
||||
// check if all otp boxes are filled
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
binding.otp3.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
binding.otp4.requestFocus();
|
||||
if (checkOTPInputs()){
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
} else {
|
||||
binding.otp2.requestFocus();
|
||||
}
|
||||
|
||||
// check if all otp boxes are filled
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
binding.otp4.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
// last otp inserted
|
||||
AppUtil.closeKeyboard(getActivity());
|
||||
} else {
|
||||
binding.otp3.requestFocus();
|
||||
}
|
||||
|
||||
// check if all otp boxes are filled
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public boolean checkOTPInputs(){
|
||||
|
||||
if (binding.otp3.getText().toString().trim().length() != 1){
|
||||
return false;
|
||||
}else if (binding.otp2.getText().toString().trim().length() != 1){
|
||||
return false;
|
||||
}else if (binding.otp3.getText().toString().trim().length() != 1){
|
||||
return false;
|
||||
}else if (binding.otp4.getText().toString().trim().length() != 1){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.ConnectCaregiverFragmentBinding;
|
||||
|
||||
public class CgConnectFragment extends Fragment {
|
||||
|
||||
protected ConnectCaregiverFragmentBinding binding;
|
||||
|
||||
public CgConnectFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = ConnectCaregiverFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
initViews();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
// showing gif
|
||||
Glide.with(binding.image)
|
||||
.asGif()
|
||||
.load(R.raw.email_sending_anim)
|
||||
.placeholder(R.drawable.forgot_pin_email_img)
|
||||
.into(binding.image);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgForgotPasswordBinding;
|
||||
|
||||
public class CgForgotPasswordFragment extends Fragment {
|
||||
|
||||
protected CgForgotPasswordBinding binding;
|
||||
|
||||
public CgForgotPasswordFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgForgotPasswordBinding.inflate(inflater, container, false);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
|
||||
binding.submit.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_cgForgotPasswordFragment_to_cgCheckEmailFragment);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
// showing gif
|
||||
Glide.with(binding.image)
|
||||
.asGif()
|
||||
.load(R.raw.email_sending_anim)
|
||||
.placeholder(R.drawable.forgot_pin_email_img)
|
||||
.into(binding.image);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class CgHowToSetUpFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgHowToSetUpFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.nextBtn.setOnClickListener(v -> Navigation.findNavController(v).navigate(R.id.action_howToSetUpFragment_to_registerFragment));
|
||||
binding.nextBtn.setOnClickListener(v -> Navigation.findNavController(v).navigate(R.id.action_cgHowToSetUpFragment_to_cgSignInFragment));
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@@ -51,6 +51,10 @@ public class CgOnBoardFragment extends Fragment {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgHowToSetUpFragment);
|
||||
});
|
||||
|
||||
binding.skip.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgHowToSetUpFragment);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
@@ -0,0 +1,388 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputFilter;
|
||||
import android.util.Log;
|
||||
import android.util.Patterns;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.databinding.CgRegisterFragmentBinding;
|
||||
import com.ssb.simplitend.databinding.PasswordPopUpBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class CgRegisterFragment extends Fragment implements WelcomeContracts.RegisterCareGiverCallback{
|
||||
|
||||
private static final String TAG = "CgRegisterFragment";
|
||||
|
||||
protected CgRegisterFragmentBinding binding;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
private CgWelcomeViewModel viewModel;
|
||||
|
||||
private DatePickerDialog datePickerDialog;
|
||||
|
||||
private ArrayList<String> countryCodeList;
|
||||
|
||||
private PopupWindow passwordWindow;
|
||||
|
||||
private Calendar dob_selected;
|
||||
|
||||
public CgRegisterFragment(){
|
||||
// required
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgRegisterFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
// password details 'i' button popup view
|
||||
PasswordPopUpBinding popUpBinding = PasswordPopUpBinding.inflate(inflater);
|
||||
passwordWindow = new PopupWindow(popUpBinding.getRoot(), LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
true);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CgWelcomeViewModel.class);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
if (getActivity() != null) {
|
||||
getActivity().getWindow()
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
|
||||
}
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
datePickerDialog = new DatePickerDialog(requireContext());
|
||||
}
|
||||
|
||||
dob_selected = Calendar.getInstance();
|
||||
|
||||
countryCodeList = viewModel.loadCountryCodeDropDown(requireContext());
|
||||
|
||||
binding.countryCodes.setLifecycleOwner(this);
|
||||
|
||||
binding.countryCodes.setItems(countryCodeList);
|
||||
|
||||
if (!countryCodeList.contains("+1")){
|
||||
countryCodeList.add("+1");
|
||||
}
|
||||
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf("+1"));
|
||||
|
||||
binding.countryCodes.setDismissWhenNotifiedItemSelected(true);
|
||||
|
||||
binding.countryCodes.setIsFocusable(true);
|
||||
|
||||
setErrorRemovers();
|
||||
|
||||
setFocusManager();
|
||||
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
|
||||
binding.backBtn.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).popBackStack();
|
||||
});
|
||||
|
||||
binding.submit.setOnClickListener(v -> {
|
||||
if (allOkay()) {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we verify your entered email.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
Map<String, RequestBody> body = new HashMap<>();
|
||||
|
||||
RequestBody name_body = RequestBody.create(binding.name.getText().toString().trim(), MediaType.parse("text/plain"));
|
||||
body.put("full_name", name_body);
|
||||
|
||||
RequestBody dob_body = RequestBody.create(binding.dob.getHint().toString(), MediaType.parse("text/plain"));
|
||||
body.put("date_of_birth", dob_body);
|
||||
|
||||
String phone_number = "";
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() != -1){
|
||||
phone_number += countryCodeList.get(binding.countryCodes.getSelectedIndex()) + " ";
|
||||
}
|
||||
|
||||
phone_number += binding.contactNumber.getText().toString();
|
||||
|
||||
RequestBody contact_body = RequestBody.create(phone_number, MediaType.parse("text/plain"));
|
||||
body.put("contact_number", contact_body);
|
||||
|
||||
RequestBody email_body = RequestBody.create(binding.email.getText().toString().trim(), MediaType.parse("text/plain"));
|
||||
body.put("email", email_body);
|
||||
|
||||
RequestBody password_body = RequestBody.create(binding.password.getText().toString().trim(), MediaType.parse("text/plain"));
|
||||
body.put("password", password_body);
|
||||
|
||||
viewModel.registerCareGiver(body, this);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
binding.dob.setOnClickListener(v -> {
|
||||
binding.dob.setError(null);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
|
||||
pickDate();
|
||||
}
|
||||
});
|
||||
|
||||
binding.tncBtn.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse("https://www.google.com"));
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
// static thing for lower android versions
|
||||
// todo should be removed afterwards
|
||||
binding.dob.setOnLongClickListener(v -> {
|
||||
binding.dob.setText("12-12-2001");
|
||||
return false;
|
||||
});
|
||||
|
||||
binding.pwdInfo.setOnClickListener(v -> {
|
||||
passwordWindow.showAsDropDown(binding.pwdTitle);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void setErrorRemovers() {
|
||||
new EditTextErrorRemover(
|
||||
binding.name,
|
||||
binding.contactNumber,
|
||||
binding.email
|
||||
);
|
||||
|
||||
// phone number formatting
|
||||
// to deal with input pasting in the edit text
|
||||
InputFilter phoneFilter = (charSequence, i, i1, spanned, i2, i3) -> {
|
||||
String phone_number_str = charSequence.toString();
|
||||
|
||||
String country_code;
|
||||
|
||||
if (binding.countryCodes.getSelectedIndex() == -1){
|
||||
country_code = "+1";
|
||||
}else{
|
||||
country_code = countryCodeList.get(binding.countryCodes.getSelectedIndex());
|
||||
}
|
||||
|
||||
try {
|
||||
PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
|
||||
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(charSequence, "US");
|
||||
|
||||
phone_number_str = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (!countryCodeList.contains(country_code)){
|
||||
countryCodeList.add(country_code);
|
||||
}
|
||||
|
||||
binding.countryCodes.selectItemByIndex(countryCodeList.indexOf(country_code));
|
||||
|
||||
if (phone_number_str.length() > 10){
|
||||
// pasted number length is greater than 10
|
||||
return phone_number_str.substring(0, 10);
|
||||
}
|
||||
|
||||
String total_phone_number = binding.contactNumber.getText().toString() + phone_number_str;
|
||||
|
||||
if (total_phone_number.length() > 10){
|
||||
// max length should be 10
|
||||
return "";
|
||||
}else{
|
||||
return phone_number_str;
|
||||
}
|
||||
};
|
||||
|
||||
binding.contactNumber.setFilters(new InputFilter[]{phoneFilter});
|
||||
|
||||
}
|
||||
|
||||
private void setFocusManager() {
|
||||
binding.name.setOnEditorActionListener((textView, i, keyEvent) -> {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
binding.name.clearFocus();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
pickDate();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
private void pickDate() {
|
||||
|
||||
if (datePickerDialog == null) return;
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) - 18);
|
||||
datePickerDialog.getDatePicker().setMaxDate(calendar.getTimeInMillis());
|
||||
|
||||
datePickerDialog.setOnDateSetListener((view, year, month, dayOfMonth) -> {
|
||||
setDOB(year, month, dayOfMonth);
|
||||
|
||||
binding.contactNumber.requestFocus();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().getWindow()
|
||||
.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
datePickerDialog.show();
|
||||
|
||||
}
|
||||
|
||||
private void setDOB(int year, int month, int dayOfMonth) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.YEAR, year);
|
||||
cal.set(Calendar.MONTH, month);
|
||||
cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy", Locale.getDefault());
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault());
|
||||
|
||||
String selected_time = sdf.format(cal.getTime());
|
||||
binding.dob.setText(selected_time);
|
||||
|
||||
// time in dd-mm-yyyy format in the hint for registering the caregiver
|
||||
binding.dob.setHint(sdf2.format(cal.getTime()));
|
||||
}
|
||||
|
||||
private boolean allOkay() {
|
||||
|
||||
boolean allOkay = true;
|
||||
|
||||
if (binding.name.getText().toString().trim().isEmpty()) {
|
||||
binding.name.setError("Required");
|
||||
allOkay = false;
|
||||
}
|
||||
|
||||
if (binding.dob.getText().toString().trim().isEmpty()) {
|
||||
binding.dob.setError("Required");
|
||||
allOkay = false;
|
||||
} else {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy", Locale.getDefault());
|
||||
try {
|
||||
Date selected_date = sdf.parse(binding.dob.getText().toString().trim());
|
||||
Calendar selected_calender = Calendar.getInstance();
|
||||
|
||||
if (selected_date == null) throw new Exception();
|
||||
|
||||
selected_calender.setTime(selected_date);
|
||||
|
||||
Calendar minAdultAge = Calendar.getInstance();
|
||||
minAdultAge.add(Calendar.YEAR, -18);
|
||||
|
||||
if (minAdultAge.before(selected_calender)) {
|
||||
Toast.makeText(requireContext(), "Age must be above 18+ years", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "allOkay: ", e);
|
||||
// TODO: 17-07-2023 check out this thing
|
||||
}
|
||||
}
|
||||
|
||||
if (binding.contactNumber.getText().toString().trim().isEmpty() ||
|
||||
binding.contactNumber.getText().toString().trim().length() <10) {
|
||||
binding.contactNumber.setError("Invalid");
|
||||
allOkay = false;
|
||||
} else if (!Patterns.PHONE.matcher(binding.contactNumber.getText().toString()).matches()) {
|
||||
binding.contactNumber.setError("Invalid contact");
|
||||
allOkay = false;
|
||||
}
|
||||
|
||||
if (binding.email.getText().toString().trim().isEmpty()) {
|
||||
binding.email.setError("Required");
|
||||
allOkay = false;
|
||||
} else if (!Patterns.EMAIL_ADDRESS.matcher(binding.email.getText().toString()).matches()) {
|
||||
binding.email.setError("Invalid email");
|
||||
allOkay = false;
|
||||
}
|
||||
|
||||
if (!binding.tncCheck.isChecked() && allOkay) {
|
||||
AppUtil.showAlert(requireContext(),
|
||||
"Accept terms and conditions",
|
||||
"Please check terms and conditions to continue.",
|
||||
"Ok",
|
||||
((dialogInterface, i) -> {
|
||||
// do nothing
|
||||
}), null, null
|
||||
);
|
||||
allOkay = false;
|
||||
}
|
||||
|
||||
// TODO: 02-08-2023 password check
|
||||
|
||||
return allOkay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCareGiverRegistered(CareGiverData careGiverData) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterFailed(Throwable t, String message) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgHowToSetUpFragmentBinding;
|
||||
import com.ssb.simplitend.databinding.CgSignInFragmentBinding;
|
||||
|
||||
public class CgSignInFragment extends Fragment {
|
||||
|
||||
// view binding
|
||||
protected CgSignInFragmentBinding binding;
|
||||
|
||||
public CgSignInFragment(){
|
||||
// required empty const.
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgSignInFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
binding.signInBtn.setOnClickListener(v -> {
|
||||
});
|
||||
|
||||
binding.registerBtn.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgSignInFragment_to_cgRegisterFragment);
|
||||
});
|
||||
|
||||
binding.forgotPassword.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_cgSignInFragment_to_cgForgotPasswordFragment);
|
||||
});
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.mvvm;
|
||||
|
||||
public class CareGiverData{
|
||||
public int id;
|
||||
public String principal_type_xid;
|
||||
public String principal_source_xid;
|
||||
public String user_name;
|
||||
public String password;
|
||||
public String first_name;
|
||||
public String last_name;
|
||||
public String gender;
|
||||
public String phone_number;
|
||||
public String email;
|
||||
public String date_of_birth;
|
||||
public String email_verified_at;
|
||||
public String address_line1;
|
||||
public String address_line2;
|
||||
public String city;
|
||||
public String state;
|
||||
public String country;
|
||||
public String post_code;
|
||||
public String lat;
|
||||
public String lng;
|
||||
public String last_login_datetime;
|
||||
public String profile_photo;
|
||||
public String active;
|
||||
public String deleted_at;
|
||||
public String created_by;
|
||||
public String updated_by;
|
||||
public String created_at;
|
||||
public String updated_at;
|
||||
public int is_patient;
|
||||
public int is_caregiver;
|
||||
public int is_caregiver_account_updated;
|
||||
public String is_admin;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.mvvm;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeApiService;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
public class CgWelcomeRepository {
|
||||
|
||||
private static final String TAG = "CgWelcomeRepository";
|
||||
|
||||
private static CgWelcomeRepository repository;
|
||||
|
||||
private final WelcomeApiService apiService;
|
||||
|
||||
private CgWelcomeRepository(){
|
||||
apiService = RetrofitHelper.getRetrofit().create(WelcomeApiService.class);
|
||||
}
|
||||
|
||||
public static CgWelcomeRepository getRepository(){
|
||||
if (repository == null){
|
||||
repository = new CgWelcomeRepository();
|
||||
}
|
||||
|
||||
return repository;
|
||||
}
|
||||
|
||||
public void registerCareGiver(Map<String, RequestBody> body,
|
||||
@NonNull WelcomeContracts.RegisterCareGiverCallback registerCareGiverCallback){
|
||||
|
||||
apiService.registerCareGiver(body)
|
||||
.enqueue(new Callback<CallResponse<CareGiverData>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<CareGiverData>> call, Response<CallResponse<CareGiverData>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200 || response.body().result == null){
|
||||
registerCareGiverCallback.onRegisterFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
registerCareGiverCallback.onCareGiverRegistered(response.body().result);
|
||||
}else{
|
||||
registerCareGiverCallback.onRegisterFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<CareGiverData>> call, Throwable t) {
|
||||
Log.e(TAG, "onFailure: ", t);
|
||||
registerCareGiverCallback.onRegisterFailed(t, "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.mvvm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class CgWelcomeViewModel extends ViewModel {
|
||||
|
||||
private static final String TAG = "CgWelcomeViewModel";
|
||||
|
||||
private final CgWelcomeRepository repository;
|
||||
|
||||
public CgWelcomeViewModel(){
|
||||
this.repository = CgWelcomeRepository.getRepository();
|
||||
}
|
||||
|
||||
public void registerCareGiver(Map<String, RequestBody> body,
|
||||
@NonNull WelcomeContracts.RegisterCareGiverCallback registerCareGiverCallback){
|
||||
repository.registerCareGiver(body, registerCareGiverCallback);
|
||||
}
|
||||
|
||||
public ArrayList<String> loadCountryCodeDropDown(Context context) {
|
||||
|
||||
ArrayList<String> countryCodeList = new ArrayList<>();
|
||||
|
||||
try {
|
||||
|
||||
String countryCodeStr = readCountryCodes(context);
|
||||
JSONArray jsonArray = new JSONArray(countryCodeStr);
|
||||
|
||||
for (int i = 0; i < jsonArray.length(); i++) {
|
||||
|
||||
JSONObject code = jsonArray.getJSONObject(i);
|
||||
|
||||
countryCodeList.add(code.getString("dial_code"));
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
// if cannot load all country codes showing only india's dial code
|
||||
countryCodeList.add("+91");
|
||||
countryCodeList.add("+1");
|
||||
|
||||
Log.e(TAG, "loadCountryCodeDropDown: ", e);
|
||||
}
|
||||
|
||||
return countryCodeList;
|
||||
}
|
||||
|
||||
public String readCountryCodes(Context context) throws IOException {
|
||||
StringBuilder returnString = new StringBuilder();
|
||||
|
||||
InputStream fIn = context.getResources().openRawResource(R.raw.country_code);
|
||||
InputStreamReader isr = new InputStreamReader(fIn);
|
||||
BufferedReader input = new BufferedReader(isr);
|
||||
|
||||
String line = "";
|
||||
|
||||
while ((line = input.readLine()) != null) {
|
||||
returnString.append(line);
|
||||
}
|
||||
|
||||
try {
|
||||
isr.close();
|
||||
|
||||
if (fIn != null) fIn.close();
|
||||
|
||||
input.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "readCountryCodes: ", e);
|
||||
}
|
||||
|
||||
return returnString.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -54,7 +55,7 @@ public class ChooseRoleFragment extends Fragment {
|
||||
|
||||
}
|
||||
|
||||
// initialize views
|
||||
// initialize views1257
|
||||
private void initViews(Bundle savedInstanceState) {
|
||||
// checking if any previous instance existed
|
||||
if (savedInstanceState != null){
|
||||
|
||||
@@ -44,7 +44,6 @@ public class ContactListAdapter extends ListAdapter<Contact, ContactListAdapter.
|
||||
holder.setData(getItem(position));
|
||||
|
||||
holder.binding.getRoot().setOnClickListener(v -> {
|
||||
Log.d("aditya", "onBindViewHolder: " + getItemCount() + " " + position);
|
||||
if (contactClickListener != null){
|
||||
contactClickListener.onClick(getItem(position));
|
||||
}
|
||||
@@ -65,10 +64,18 @@ public class ContactListAdapter extends ListAdapter<Contact, ContactListAdapter.
|
||||
}
|
||||
|
||||
public void setData(Contact contact){
|
||||
if (contact.first_name == null){
|
||||
binding.name.setText("No name");
|
||||
return;
|
||||
}
|
||||
|
||||
binding.name.setText(contact.first_name);
|
||||
|
||||
// static
|
||||
binding.initial.setText(contact.first_name.substring(0, 1).toUpperCase());
|
||||
if (contact.first_name.length() >= 1)
|
||||
{
|
||||
binding.initial.setText(contact.first_name.substring(0, 1).toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -158,9 +158,6 @@ public class ContactListFragment extends Fragment {
|
||||
if (granted) {
|
||||
// user granted the READ_CONTACT permission
|
||||
loadContacts();
|
||||
} else {
|
||||
// user denied the permission
|
||||
// TODO: 28-06-2023
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -37,7 +37,6 @@ public class UserContactRepository {
|
||||
ContactsContract.CommonDataKinds.Phone.CONTACT_ID,
|
||||
ContactsContract.Contacts.DISPLAY_NAME,
|
||||
ContactsContract.CommonDataKinds.Phone.NUMBER,
|
||||
ContactsContract.CommonDataKinds.Phone.PHOTO_URI
|
||||
};
|
||||
|
||||
private static UserContactRepository contactRepository;
|
||||
@@ -172,7 +171,11 @@ public class UserContactRepository {
|
||||
|
||||
ContentResolver cr = context.getContentResolver();
|
||||
|
||||
Cursor cursor = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, PROJECTION, null, null, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " ASC");
|
||||
Cursor cursor = cr.query(
|
||||
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
|
||||
PROJECTION,
|
||||
null, null,
|
||||
ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " ASC");
|
||||
|
||||
if (cursor != null) {
|
||||
|
||||
@@ -188,7 +191,7 @@ public class UserContactRepository {
|
||||
name = cursor.getString(nameIndex);
|
||||
number = cursor.getString(numberIndex);
|
||||
|
||||
Log.d(TAG, "getContactList: " + number);
|
||||
if (number == null) continue;
|
||||
|
||||
if (!mobileNoSet.contains(number)) {
|
||||
try {
|
||||
@@ -198,9 +201,13 @@ public class UserContactRepository {
|
||||
number = String.valueOf(phoneNumber.getNationalNumber());
|
||||
country_code = "+" + phoneNumber.getCountryCode();
|
||||
} catch (Exception e) {
|
||||
number = number.replace("-", "");
|
||||
number = number.replace("(", "");
|
||||
number = number.replace(")", "");
|
||||
try {
|
||||
number = number.replace("-", "");
|
||||
number = number.replace("(", "");
|
||||
number = number.replace(")", "");
|
||||
}catch (Exception e2){
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
Contact contact = new Contact(name, number);
|
||||
|
||||
14
app/src/main/res/drawable/edit_text_bg_3.xml
Normal file
14
app/src/main/res/drawable/edit_text_bg_3.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid
|
||||
android:color="#EBF3FC"/>
|
||||
|
||||
<corners
|
||||
android:radius="25dp"/>
|
||||
|
||||
<stroke android:width="1dp"
|
||||
android:color="#C9E0FB"/>
|
||||
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/edit_text_bg_4.xml
Normal file
12
app/src/main/res/drawable/edit_text_bg_4.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/white"/>
|
||||
|
||||
<stroke android:color="#C9E0FB"
|
||||
android:width="1dp"/>
|
||||
|
||||
<corners android:radius="25dp"/>
|
||||
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/ic_info.xml
Normal file
10
app/src/main/res/drawable/ic_info.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#000000"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z" />
|
||||
</vector>
|
||||
227
app/src/main/res/layout/cg_change_password_fragment.xml
Normal file
227
app/src/main/res/layout/cg_change_password_fragment.xml
Normal file
@@ -0,0 +1,227 @@
|
||||
<?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:background="@color/white_bg">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/reset_pin"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/change_your_password"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineLarge"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/for_your_security_please_change_the_temporary_password_to_a_new_password"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/new_password"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleDrawable="@drawable/password_toggle"
|
||||
app:passwordToggleEnabled="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg"
|
||||
|
||||
android:hint="@string/enter_your_new_password"
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="numberPassword"
|
||||
android:maxLines="1"
|
||||
android:maxLength="4"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginHorizontal="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/has_a_number"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/has_at_uppercase_letter_or_symbol"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/has_at_least_8_characters"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/confirm_password_"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleDrawable="@drawable/password_toggle"
|
||||
app:passwordToggleEnabled="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/confirm_pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg"
|
||||
|
||||
android:hint="@string/enter_your_password"
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="numberPassword"
|
||||
android:maxLines="1"
|
||||
android:maxLength="4"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset_pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:text="@string/reset_password"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:paddingVertical="15dp"
|
||||
app:cornerRadius="25dp"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
265
app/src/main/res/layout/cg_check_email_fragment.xml
Normal file
265
app/src/main/res/layout/cg_check_email_fragment.xml
Normal file
@@ -0,0 +1,265 @@
|
||||
<?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:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/white_bg">
|
||||
|
||||
<ScrollView
|
||||
android:layout_above="@id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/check_your_mail"
|
||||
android:textSize="@dimen/_24ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/please_enter_the_temporary_pin_recieved_at_email_address_at_k_gmail_com"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:id="@+id/email_at"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/at"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:layout_marginStart="10dp"
|
||||
tools:text="************57@gmail.com"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_140sdp"
|
||||
android:layout_height="@dimen/_140sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="35sp"
|
||||
android:contentDescription="@string/forget_pin" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/enter_otp"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4"
|
||||
android:layout_marginVertical="5dp"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/otp_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/otp_box_bg"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/ast"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/otp_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/otp_box_bg"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:hint="@string/ast"
|
||||
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
tools:text="1" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/otp_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/otp_box_bg"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:hint="@string/ast"
|
||||
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
tools:text="1" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/otp_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:autofillHints="password"
|
||||
android:background="@drawable/otp_box_bg"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/ast"
|
||||
|
||||
android:inputType="number"
|
||||
|
||||
android:maxLength="1"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleLarge"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="15dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/didn_t_your_receive_any_code"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resend_otp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/resend"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:padding="5dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<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:backgroundTint="@color/color_primary"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:text="@string/submit"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:paddingVertical="15dp"
|
||||
app:cornerRadius="25dp"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
120
app/src/main/res/layout/cg_forgot_password.xml
Normal file
120
app/src/main/res/layout/cg_forgot_password.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/white_bg">
|
||||
|
||||
<ScrollView
|
||||
android:layout_above="@id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:paddingBottom="15dp"
|
||||
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:contentDescription="@string/back_button"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/arrow_back"
|
||||
android:paddingStart="-15dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:layout_margin="15dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/forgot_password_"
|
||||
android:textSize="@dimen/_24ssp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginTop="20dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
tools:text="A temporary pin will be sent to the registered email address (s***@ Si***.com) and phone number (+1732***88)"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_140sdp"
|
||||
android:layout_height="@dimen/_140sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="25dp"
|
||||
android:contentDescription="@string/forget_pin"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_email_address"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginVertical="15dp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
android:layout_marginHorizontal="15sp"
|
||||
android:hint="@string/enter_your_email"
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="15dp"
|
||||
|
||||
tools:text="Aditya"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_email_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="emailAddress"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<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_marginBottom="25dp"
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:layout_marginTop="25dp"
|
||||
android:text="@string/send_otp"
|
||||
android:textColor="@color/white_bg"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:paddingVertical="15dp"
|
||||
app:cornerRadius="25dp"
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
454
app/src/main/res/layout/cg_register_fragment.xml
Normal file
454
app/src/main/res/layout/cg_register_fragment.xml
Normal file
@@ -0,0 +1,454 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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:background="@color/white_bg"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<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:contentDescription="@string/back_button"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/arrow_back"
|
||||
android:layout_margin="15dp"
|
||||
android:paddingStart="-15dp"
|
||||
android:paddingEnd="0dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/create_your_account"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineMedium"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:text="@string/enter_your_information_below"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/name"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="35sp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_full_name"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_user"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="name"
|
||||
android:inputType="textCapWords"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/date_of_birth"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dob"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_your_date_of_birth"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_dob" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/contact_number"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/phone_number"
|
||||
|
||||
android:layout_marginStart="10dp"
|
||||
|
||||
android:src="@drawable/ic_phone"
|
||||
android:layout_marginVertical="10dp"/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/country_codes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14.5sp"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
app:spinner_arrow_gravity="end"
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginVertical="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/contact_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
android:hint="@string/phone_number"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:autofillHints="phone"
|
||||
android:inputType="number"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/email_address"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_email_address"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_email"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="emailAddress"
|
||||
android:inputType="textEmailAddress"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pwd_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_login_password"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pwd_info"
|
||||
android:layout_width="@dimen/_15sdp"
|
||||
android:layout_height="@dimen/_15sdp"
|
||||
android:contentDescription="@string/info"
|
||||
|
||||
android:src="@drawable/ic_info"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
|
||||
android:padding="3dp"
|
||||
|
||||
app:tint="@color/pwd_bg" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleDrawable="@drawable/password_toggle"
|
||||
app:passwordToggleEnabled="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
|
||||
android:hint="@string/set_your_password"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="textPassword"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/confirm_password"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleDrawable="@drawable/password_toggle"
|
||||
app:passwordToggleEnabled="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
|
||||
android:hint="@string/confirm_your_password"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="textPassword"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/tncCheck"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:checked="false"
|
||||
android:button="@drawable/remember_me_selector"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:background="@android:color/transparent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/i_accept"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tnc_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/terms_n_conditions"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:padding="5dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
207
app/src/main/res/layout/cg_sign_in_fragment.xml
Normal file
207
app/src/main/res/layout/cg_sign_in_fragment.xml
Normal file
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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:overScrollMode="never"
|
||||
android:background="@color/white_bg">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_150sdp"
|
||||
android:layout_height="@dimen/_150sdp"
|
||||
android:src="@drawable/welcome_img"
|
||||
android:contentDescription="@string/welcome_illustration"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/welcome_to_simplitend"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_24ssp"
|
||||
android:textAlignment="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sign_in_to_continue"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textAlignment="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_email_address_"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:layout_gravity="start"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="35sp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:hint="@string/enter_your_email"
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_email_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="emailAddress"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_password"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleDrawable="@drawable/password_toggle"
|
||||
app:passwordToggleEnabled="true"
|
||||
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:hint="@string/enter_your_password"
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:text="@string/remember_me"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:checked="false"
|
||||
android:button="@drawable/remember_me_selector"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/forgot_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:padding="5dp"
|
||||
android:text="@string/forgot_password"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sign_in_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:text="@string/login"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="25dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/register_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:padding="5dp"
|
||||
|
||||
android:text="@string/new_here_register_as_a_caregiver"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
182
app/src/main/res/layout/connect_caregiver_fragment.xml
Normal file
182
app/src/main/res/layout/connect_caregiver_fragment.xml
Normal file
@@ -0,0 +1,182 @@
|
||||
<?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:background="@color/white">
|
||||
|
||||
<ScrollView
|
||||
android:layout_above="@id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_130sdp"
|
||||
android:layout_height="@dimen/_130sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginTop="@dimen/_50sdp"
|
||||
android:contentDescription="@string/forget_pin"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/accept_your_loved_one_s_invitation_to_connect"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textAlignment="center"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_your_email_or_phone_number"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginVertical="15dp"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
android:layout_marginHorizontal="15sp"
|
||||
android:hint="@string/enter_your_email"
|
||||
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="15dp"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_email_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="emailAddress"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
|
||||
android:enabled="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/enter_code_sent_on_your_email"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:hint="@string/enter_your_code"
|
||||
android:paddingVertical="15sp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="textVisiblePassword"
|
||||
android:maxLines="1"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sign_in_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/connect"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="25dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/register_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:padding="5dp"
|
||||
|
||||
android:text="@string/didn_t_receive_code_resend"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
23
app/src/main/res/layout/password_pop_up.xml
Normal file
23
app/src/main/res/layout/password_pop_up.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/pwd_bg"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/password_details"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
|
||||
android:padding="10dp"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -235,5 +235,52 @@
|
||||
<fragment
|
||||
android:id="@+id/cgHowToSetUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgHowToSetUpFragment"
|
||||
android:label="CgHowToSetUpFragment" />
|
||||
android:label="CgHowToSetUpFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgHowToSetUpFragment_to_cgSignInFragment"
|
||||
app:destination="@id/cgSignInFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgSignInFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgSignInFragment"
|
||||
android:label="CgSignInFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgSignInFragment_to_cgRegisterFragment"
|
||||
app:destination="@id/cgRegisterFragment" />
|
||||
<action
|
||||
android:id="@+id/action_cgSignInFragment_to_cgForgotPasswordFragment"
|
||||
app:destination="@id/cgForgotPasswordFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgRegisterFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgRegisterFragment"
|
||||
android:label="CgRegisterFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgRegisterFragment_to_cgConnectFragment"
|
||||
app:destination="@id/cgConnectFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgConnectFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgConnectFragment"
|
||||
android:label="CgConnectFragment" />
|
||||
<fragment
|
||||
android:id="@+id/cgForgotPasswordFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgForgotPasswordFragment"
|
||||
android:label="CgForgotPasswordFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgForgotPasswordFragment_to_cgCheckEmailFragment"
|
||||
app:destination="@id/cgCheckEmailFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgCheckEmailFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgCheckEmailFragment"
|
||||
android:label="CgCheckEmailFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgCheckEmailFragment_to_cgChangePwdFragment"
|
||||
app:destination="@id/cgChangePwdFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgChangePwdFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgChangePwdFragment"
|
||||
android:label="CgChangePwdFragment" />
|
||||
</navigation>
|
||||
@@ -13,5 +13,6 @@
|
||||
<color name="color_accent">#C9E0FB</color>
|
||||
|
||||
<color name="cg_dash_bg">#005F9A</color>
|
||||
<color name="pwd_bg">#545454</color>
|
||||
|
||||
</resources>
|
||||
@@ -253,7 +253,7 @@
|
||||
<string name="setup_a_geofence_to_protect_your_loved_one">Setup a geofence to\nprotect your loved one.</string>
|
||||
<string name="you_are_always_connected_and_will_be_notified_when_your_loved_ones_need_you">You are always connected and will be notified when your loved ones need you.</string>
|
||||
<string name="application_will_notify_you_when_it_is_time_for_your_loved_one_to_take_his_her_medication">Application will notify you when it is time for your loved one to take his/her medication.</string>
|
||||
<string name="be_notified_if_your_loved_one_ventures_too_far_from_home_or_a_designated_safe_area">Be notified if your loved one ventures too far from home or a designated safe area</string>
|
||||
<string name="be_notified_if_your_loved_one_ventures_too_far_from_home_or_a_designated_safe_area">Be notified if your loved one ventures too far from home or a designated safe area.</string>
|
||||
<string name="skip">Skip</string>
|
||||
<string name="get_started">Get started</string>
|
||||
<string name="create_your_account">Create your account</string>
|
||||
@@ -264,5 +264,34 @@
|
||||
<string name="complete_application_subscription">Complete application subscription</string>
|
||||
<string name="you_are_ready">You are ready!</string>
|
||||
<string name="your_phone_is_linked_to_your_loved_one">Your phone is linked to your loved one.</string>
|
||||
<string name="enter_email_address_">Enter email address</string>
|
||||
<string name="enter_password">Enter password</string>
|
||||
<string name="enter_your_password">Enter your password</string>
|
||||
<string name="forgot_password">Forgot password ?</string>
|
||||
<string name="new_here_register_as_a_caregiver">New Here? <b>Register as a Caregiver</b></string>
|
||||
<string name="enter_your_information_below">Enter your information below</string>
|
||||
<string name="set_login_password">Set login password*</string>
|
||||
<string name="set_your_password">Set your password</string>
|
||||
<string name="confirm_password">Confirm password*</string>
|
||||
<string name="confirm_password_">Confirm password</string>
|
||||
<string name="confirm_your_password">Confirm your password</string>
|
||||
<string name="enter_your_email_or_phone_number">Enter your email or phone number</string>
|
||||
<string name="enter_code_sent_on_your_email">Enter code sent on your email</string>
|
||||
<string name="connect">Connect</string>
|
||||
<string name="didn_t_receive_code_resend">Didn\'t receive code ? <b>Resend</b></string>
|
||||
<string name="enter_your_code">Enter your code</string>
|
||||
<string name="forgot_password_">Forgot password</string>
|
||||
<string name="change_your_password">Change your password</string>
|
||||
<string name="for_your_security_please_change_the_temporary_password_to_a_new_password">For your security, Please change the temporary password to a new password</string>
|
||||
<string name="new_password">New password</string>
|
||||
<string name="enter_your_new_password">Enter your new password</string>
|
||||
<string name="has_a_number">* Has a number</string>
|
||||
<string name="has_at_uppercase_letter_or_symbol">* Has at uppercase letter or symbol</string>
|
||||
<string name="has_at_least_8_characters">* Has at least 8 characters</string>
|
||||
<string name="reset_password">Reset password</string>
|
||||
<string name="send_otp">Send OTP</string>
|
||||
<string name="enter_otp">Enter OTP</string>
|
||||
<string name="password_details"><![CDATA[- Be at least 8 characters in length. \n- Contain both upper and lowercase alphabetic characters (e.g. A-Z, a-z). \n- Have at least one numerical character (e.g. 0-9). \n- Have at least one special character (e.g. ~!@#$%^&*()_-+=).]]></string>
|
||||
<string name="info">info</string>
|
||||
|
||||
</resources>
|
||||
@@ -1,4 +1,10 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.0'
|
||||
classpath 'com.google.gms:google-services:4.3.14'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||
}
|
||||
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '7.3.1' apply false
|
||||
id 'com.android.library' version '7.3.1' apply false
|
||||
|
||||
Reference in New Issue
Block a user