.
This commit is contained in:
12
.idea/deploymentTargetDropDown.xml
generated
12
.idea/deploymentTargetDropDown.xml
generated
@@ -1,18 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="5203ae2be8ec4353" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-08-04T15:29:14.667298200Z" />
|
||||
<runningDeviceTargetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg;
|
||||
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgForgotPwdResult;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.ConnectCgResult;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.PartMap;
|
||||
@@ -17,4 +23,23 @@ public interface WelcomeApiService {
|
||||
@POST("api/auth/caregiver-register")
|
||||
Call<CallResponse<CareGiverData>> registerCareGiver(@PartMap Map<String, RequestBody> body);
|
||||
|
||||
@POST("api/auth/caregiver-login")
|
||||
Call<CallResponse<CareGiverData>> loginCaregiver(@Body Map<String, String> body);
|
||||
|
||||
@POST("api/auth/patient-caregiver-connect")
|
||||
Call<CallResponse<Object>> verifyCgOTP(@Body Map<String, String> body);
|
||||
|
||||
@GET("api/auth/forgot-caregiver-password")
|
||||
Call<CallResponse<CgForgotPwdResult>> sendForgotCodeEmail(@Header("email") String email);
|
||||
|
||||
@POST("api/auth/verify-caregiver-otp")
|
||||
Call<CallResponse<String>> verifyForgotOTP(@Body Map<String, String> body);
|
||||
|
||||
@Multipart
|
||||
@POST("api/auth/change-caregiver-password")
|
||||
Call<CallResponse<CareGiverData>> changeCgPassword(@PartMap Map<String, RequestBody> body);
|
||||
|
||||
@POST("api/auth/patient-caregiver-connect")
|
||||
Call<CallResponse<ConnectCgResult>> connectCg(@Body Map<String, String> body);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg;
|
||||
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgForgotPwdResult;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.ConnectCgResult;
|
||||
|
||||
public interface WelcomeContracts {
|
||||
|
||||
@@ -12,4 +14,42 @@ public interface WelcomeContracts {
|
||||
|
||||
}
|
||||
|
||||
interface VerifyCgOTPCallback{
|
||||
void onOTPVerifies();
|
||||
|
||||
void onVerifyOTPFailed(Throwable t, String message);
|
||||
}
|
||||
|
||||
interface CgLoginCallback{
|
||||
void onLoginSuccess(CareGiverData careGiverData, String token);
|
||||
|
||||
void onLogInFailed(Throwable t, String message);
|
||||
}
|
||||
|
||||
interface ForgotPwdSentCodeCallback{
|
||||
void onEmailSentSuccess(CgForgotPwdResult result);
|
||||
|
||||
void onEmailSentFailed(Throwable t, String message);
|
||||
}
|
||||
|
||||
interface VerifyForgotOTP{
|
||||
void onOTPVerified();
|
||||
|
||||
void onOTPVerificationFailed(Throwable t, String message);
|
||||
}
|
||||
|
||||
interface ChangePasswordCallback{
|
||||
void onPasswordChanged(CareGiverData careGiverData);
|
||||
|
||||
void onPasswordChangeFailed(Throwable t, String message);
|
||||
}
|
||||
|
||||
interface ConnectCgCallback{
|
||||
|
||||
void onCgConnected(ConnectCgResult result);
|
||||
|
||||
void onCgConnectFailed(Throwable throwable, String message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,43 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import static com.ssb.simplitend.welcome.welcomecg.fragments.CgCheckEmailFragment.FORGOT_EMAIL;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgChangePasswordFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
|
||||
public class CgChangePwdFragment extends Fragment {
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class CgChangePwdFragment extends Fragment implements WelcomeContracts.ChangePasswordCallback {
|
||||
|
||||
protected CgChangePasswordFragmentBinding binding;
|
||||
|
||||
public CgChangePwdFragment(){
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
private CgWelcomeViewModel viewModel;
|
||||
|
||||
private String eEmail;
|
||||
|
||||
public CgChangePwdFragment() {
|
||||
// required
|
||||
}
|
||||
|
||||
@@ -24,6 +46,103 @@ public class CgChangePwdFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgChangePasswordFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CgWelcomeViewModel.class);
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.resetPin.setOnClickListener(v -> {
|
||||
if (allOkay()) {
|
||||
changePassword();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void changePassword() {
|
||||
if (eEmail == null ||
|
||||
binding.password.getText() == null ||
|
||||
binding.confirmPassword.getText() == null) {
|
||||
Toast.makeText(requireContext(), "Something goes wrong, Try again.", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we change your password.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
Map<String, RequestBody> body = new HashMap<>();
|
||||
|
||||
RequestBody email_body = RequestBody.create(eEmail, MediaType.parse("text/plain"));
|
||||
body.put("email", email_body);
|
||||
|
||||
RequestBody password_body = RequestBody.create(binding.password.getText().toString(), MediaType.parse("text/plain"));
|
||||
body.put("password", password_body);
|
||||
|
||||
RequestBody c_password_body = RequestBody.create(binding.confirmPassword.getText().toString(), MediaType.parse("text/plain"));
|
||||
body.put("c_password", c_password_body);
|
||||
|
||||
viewModel.changeCgPassword(body, this);
|
||||
|
||||
}
|
||||
|
||||
private boolean allOkay() {
|
||||
boolean allOkay = true;
|
||||
|
||||
if (binding.password.getText() != null && binding.confirmPassword.getText() != null) {
|
||||
String password = binding.password.getText().toString();
|
||||
|
||||
if (password.length() < 8) {
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Password must be at least 8 characters.", Toast.LENGTH_SHORT).show();
|
||||
} else if (password.contains(" ")) {
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Password should not contains white spaces.", Toast.LENGTH_SHORT).show();
|
||||
} else if (!password.matches("^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^a-zA-Z0-9]).{8,}$")) {
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Password doesn't match the required criteria.", Toast.LENGTH_SHORT).show();
|
||||
} else if (!binding.confirmPassword.getText().toString().equals(password)) {
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Confirm password doesn't match.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
return allOkay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle == null ||
|
||||
bundle.getString(FORGOT_EMAIL, null) == null) {
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
Toast.makeText(requireContext(), "Something went wrong.", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
eEmail = bundle.getString(FORGOT_EMAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPasswordChanged(CareGiverData careGiverData) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "Password changed successfully.", Toast.LENGTH_SHORT).show();
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.popBackStack(R.id.cgSignInFragment, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPasswordChangeFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,46 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
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 android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
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;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgForgotPwdResult;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
|
||||
public class CgCheckEmailFragment extends Fragment {
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CgCheckEmailFragment extends Fragment implements WelcomeContracts.ForgotPwdSentCodeCallback,
|
||||
WelcomeContracts.VerifyForgotOTP {
|
||||
|
||||
protected CgCheckEmailFragmentBinding binding;
|
||||
|
||||
public CgCheckEmailFragment(){
|
||||
public static final String FORGOT_EMAIL = "forgot_mail";
|
||||
public static final String CG_USER_XID = "cg_user_xid";
|
||||
|
||||
private String mEmail, mUserXid;
|
||||
|
||||
private CgWelcomeViewModel viewModel;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
public CgCheckEmailFragment() {
|
||||
// required
|
||||
}
|
||||
|
||||
@@ -30,6 +49,8 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgCheckEmailFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CgWelcomeViewModel.class);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
@@ -37,15 +58,68 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle == null ||
|
||||
bundle.getString(FORGOT_EMAIL, null) == null ||
|
||||
bundle.getString(CG_USER_XID, null) == null) {
|
||||
// no data received
|
||||
Navigation.findNavController(binding.getRoot()).popBackStack();
|
||||
Toast.makeText(requireContext(), "Something went wrong.", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
mEmail = bundle.getString(FORGOT_EMAIL);
|
||||
mUserXid = bundle.getString(CG_USER_XID);
|
||||
|
||||
binding.emailAt.setVisibility(View.VISIBLE);
|
||||
binding.email.setText(mEmail);
|
||||
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.submit.setOnClickListener(view -> {
|
||||
Navigation.findNavController(view)
|
||||
.navigate(R.id.action_cgCheckEmailFragment_to_cgChangePwdFragment);
|
||||
if (checkOTPInputs()){
|
||||
verifyOTP();
|
||||
}else{
|
||||
Toast.makeText(requireContext(), "Enter OTP received on your email.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
binding.resendOtp.setOnClickListener(v -> {
|
||||
if (mEmail == null) return;
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we resend you an OTP.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
viewModel.sendForgotCodeEmail(mEmail, this);
|
||||
});
|
||||
}
|
||||
|
||||
private void verifyOTP() {
|
||||
progressDialog.setTitle("Please wait");
|
||||
progressDialog.setMessage("while we verify your OTP.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
Map<String, String> body = new HashMap<>();
|
||||
|
||||
body.put("otp_code", getOTPFromInputs());
|
||||
|
||||
body.put("user_id", mUserXid);
|
||||
|
||||
viewModel.verifyForgotOTP(body, this);
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
// showing gif
|
||||
Glide.with(binding.image)
|
||||
.asGif()
|
||||
@@ -57,6 +131,13 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
|
||||
}
|
||||
|
||||
private String getOTPFromInputs() {
|
||||
return binding.otp1.getText().toString() +
|
||||
binding.otp2.getText().toString() +
|
||||
binding.otp3.getText().toString() +
|
||||
binding.otp4.getText().toString();
|
||||
}
|
||||
|
||||
/*
|
||||
setting text change listener for every edit text for otp
|
||||
*/
|
||||
@@ -77,7 +158,7 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
binding.otp2.requestFocus();
|
||||
if (checkOTPInputs()){
|
||||
if (checkOTPInputs()) {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
}
|
||||
@@ -102,7 +183,7 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
binding.otp3.requestFocus();
|
||||
if (checkOTPInputs()){
|
||||
if (checkOTPInputs()) {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
} else {
|
||||
@@ -129,7 +210,7 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!s.toString().trim().isEmpty()) {
|
||||
binding.otp4.requestFocus();
|
||||
if (checkOTPInputs()){
|
||||
if (checkOTPInputs()) {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
} else {
|
||||
@@ -168,19 +249,67 @@ public class CgCheckEmailFragment extends Fragment {
|
||||
|
||||
}
|
||||
|
||||
public boolean checkOTPInputs(){
|
||||
public boolean checkOTPInputs() {
|
||||
|
||||
if (binding.otp3.getText().toString().trim().length() != 1){
|
||||
if (binding.otp3.getText().toString().trim().length() != 1) {
|
||||
return false;
|
||||
}else if (binding.otp2.getText().toString().trim().length() != 1){
|
||||
} else if (binding.otp2.getText().toString().trim().length() != 1) {
|
||||
return false;
|
||||
}else if (binding.otp3.getText().toString().trim().length() != 1){
|
||||
} else if (binding.otp3.getText().toString().trim().length() != 1) {
|
||||
return false;
|
||||
}else if (binding.otp4.getText().toString().trim().length() != 1){
|
||||
} else if (binding.otp4.getText().toString().trim().length() != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// otp send callback
|
||||
@Override
|
||||
public void onEmailSentSuccess(CgForgotPwdResult result) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "OTP resent successfully.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
clearInputs();
|
||||
}
|
||||
|
||||
private void clearInputs() {
|
||||
binding.otp1.setText(null);
|
||||
binding.otp2.setText(null);
|
||||
binding.otp3.setText(null);
|
||||
binding.otp4.setText(null);
|
||||
|
||||
binding.otp1.requestFocus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmailSentFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "Couldn't resend OTP.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
// verify otp callback
|
||||
|
||||
|
||||
@Override
|
||||
public void onOTPVerified() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(FORGOT_EMAIL, mEmail);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "OTP verification successful.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_cgCheckEmailFragment_to_cgChangePwdFragment, bundle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOTPVerificationFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,20 +4,28 @@ import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.ConnectCaregiverFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
|
||||
public class CgConnectFragment extends Fragment {
|
||||
|
||||
protected ConnectCaregiverFragmentBinding binding;
|
||||
|
||||
public CgConnectFragment(){
|
||||
public static final String CAREGIVER_EMAIL = "cg_email";
|
||||
public static final String CAREGIVER_PASSWORD = "caregiver_pwd";
|
||||
|
||||
private String cg_email, cg_password;
|
||||
|
||||
public CgConnectFragment() {
|
||||
// required
|
||||
}
|
||||
|
||||
@@ -39,5 +47,30 @@ public class CgConnectFragment extends Fragment {
|
||||
.load(R.raw.email_sending_anim)
|
||||
.placeholder(R.drawable.forgot_pin_email_img)
|
||||
.into(binding.image);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle == null ||
|
||||
bundle.getString(CAREGIVER_EMAIL, null) == null ||
|
||||
bundle.getString(CAREGIVER_PASSWORD, null) == null) {
|
||||
// no data received
|
||||
// Thus, asking cg_user to sign in again
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.popBackStack(R.id.cgSignInFragment, false);
|
||||
|
||||
return;
|
||||
}else{
|
||||
cg_email = bundle.getString(CAREGIVER_EMAIL);
|
||||
cg_password = bundle.getString(CAREGIVER_PASSWORD);
|
||||
|
||||
binding.emailAddress.setText(cg_email);
|
||||
Toast.makeText(requireContext(), "" + cg_password, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,43 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import static com.ssb.simplitend.welcome.welcomecg.fragments.CgCheckEmailFragment.CG_USER_XID;
|
||||
import static com.ssb.simplitend.welcome.welcomecg.fragments.CgCheckEmailFragment.FORGOT_EMAIL;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.util.Patterns;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
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.CgForgotPasswordBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgForgotPwdResult;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
|
||||
public class CgForgotPasswordFragment extends Fragment {
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CgForgotPasswordFragment extends Fragment implements WelcomeContracts.ForgotPwdSentCodeCallback {
|
||||
|
||||
protected CgForgotPasswordBinding binding;
|
||||
|
||||
private CgWelcomeViewModel viewModel;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
String mEmail;
|
||||
|
||||
public CgForgotPasswordFragment(){
|
||||
// required
|
||||
}
|
||||
@@ -27,6 +47,8 @@ public class CgForgotPasswordFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgForgotPasswordBinding.inflate(inflater, container, false);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CgWelcomeViewModel.class);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
@@ -37,14 +59,31 @@ public class CgForgotPasswordFragment extends Fragment {
|
||||
private void clickEvents() {
|
||||
|
||||
binding.submit.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_cgForgotPasswordFragment_to_cgCheckEmailFragment);
|
||||
|
||||
if (!Patterns.EMAIL_ADDRESS.matcher(binding.emailAddress.getText().toString().trim()).matches()){
|
||||
binding.emailAddress.setError("Invalid email.");
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we send you an email with a code.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
mEmail = binding.emailAddress.getText().toString().trim();
|
||||
|
||||
viewModel.sendForgotCodeEmail(mEmail, this);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
// showing gif
|
||||
Glide.with(binding.image)
|
||||
.asGif()
|
||||
@@ -54,4 +93,26 @@ public class CgForgotPasswordFragment extends Fragment {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmailSentSuccess(CgForgotPwdResult result) {
|
||||
Bundle bundle = new Bundle();
|
||||
|
||||
bundle.putString(FORGOT_EMAIL, mEmail);
|
||||
bundle.putString(CG_USER_XID, result.principal_xid);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "OTP sent successfully.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_cgForgotPasswordFragment_to_cgCheckEmailFragment, bundle);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmailSentFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import static com.ssb.simplitend.welcome.welcomecg.fragments.CgConnectFragment.CAREGIVER_EMAIL;
|
||||
import static com.ssb.simplitend.welcome.welcomecg.fragments.CgConnectFragment.CAREGIVER_PASSWORD;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
@@ -27,6 +30,7 @@ import androidx.navigation.Navigation;
|
||||
import com.google.i18n.phonenumbers.NumberParseException;
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.ssb.simplitend.databinding.CgRegisterFragmentBinding;
|
||||
@@ -62,6 +66,8 @@ public class CgRegisterFragment extends Fragment implements WelcomeContracts.Reg
|
||||
|
||||
private PopupWindow passwordWindow;
|
||||
|
||||
private String mPassword;
|
||||
|
||||
private Calendar dob_selected;
|
||||
|
||||
public CgRegisterFragment(){
|
||||
@@ -140,7 +146,7 @@ public class CgRegisterFragment extends Fragment implements WelcomeContracts.Reg
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we verify your entered email.");
|
||||
progressDialog.setMessage("while we register you as a caregiver.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
@@ -166,7 +172,13 @@ public class CgRegisterFragment extends Fragment implements WelcomeContracts.Reg
|
||||
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"));
|
||||
if (binding.password.getText() == null){
|
||||
mPassword = "";
|
||||
}else{
|
||||
mPassword = binding.password.getText().toString();
|
||||
}
|
||||
|
||||
RequestBody password_body = RequestBody.create(mPassword, MediaType.parse("text/plain"));
|
||||
body.put("password", password_body);
|
||||
|
||||
viewModel.registerCareGiver(body, this);
|
||||
@@ -375,6 +387,25 @@ public class CgRegisterFragment extends Fragment implements WelcomeContracts.Reg
|
||||
allOkay = false;
|
||||
}
|
||||
|
||||
if (allOkay && binding.password.getText() != null && binding.confirmPassword.getText() != null){
|
||||
String password = binding.password.getText().toString();
|
||||
|
||||
if (password.length() < 8){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Password must be at least 8 characters.", Toast.LENGTH_SHORT).show();
|
||||
}else if (password.contains(" ")){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Password should not contains white spaces.", Toast.LENGTH_SHORT).show();
|
||||
}else if (!password.matches("^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^a-zA-Z0-9]).{8,}$")){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Password doesn't match the required criteria.", Toast.LENGTH_SHORT).show();
|
||||
passwordWindow.showAsDropDown(binding.pwdTitle);
|
||||
}else if (!binding.confirmPassword.getText().toString().equals(password)){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Confirm password doesn't match.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
if (!binding.tncCheck.isChecked() && allOkay) {
|
||||
AppUtil.showAlert(requireContext(),
|
||||
"Accept terms and conditions",
|
||||
@@ -387,18 +418,31 @@ public class CgRegisterFragment extends Fragment implements WelcomeContracts.Reg
|
||||
allOkay = false;
|
||||
}
|
||||
|
||||
// TODO: 02-08-2023 password check
|
||||
|
||||
return allOkay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCareGiverRegistered(CareGiverData careGiverData) {
|
||||
Toast.makeText(requireContext(), "Caregiver registered successfully.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(CAREGIVER_EMAIL, careGiverData.email);
|
||||
bundle.putString(CAREGIVER_PASSWORD, mPassword);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
Navigation.findNavController(binding.getRoot())
|
||||
.navigate(R.id.action_cgRegisterFragment_to_cgConnectFragment, bundle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterFailed(Throwable t, String message) {
|
||||
|
||||
progressDialog.dismiss();
|
||||
AppUtil.showAlert(requireContext(),
|
||||
getString(R.string.something_went_wrong),
|
||||
message,
|
||||
getString(R.string.ok),
|
||||
((dialogInterface, i) -> {}),
|
||||
null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,37 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.databinding.CgHowToSetUpFragmentBinding;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.CgSignInFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
|
||||
public class CgSignInFragment extends Fragment {
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CgSignInFragment extends Fragment implements WelcomeContracts.CgLoginCallback {
|
||||
|
||||
// view binding
|
||||
protected CgSignInFragmentBinding binding;
|
||||
|
||||
private CgWelcomeViewModel viewModel;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
public CgSignInFragment(){
|
||||
// required empty const.
|
||||
}
|
||||
@@ -28,7 +41,47 @@ public class CgSignInFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = CgSignInFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CgWelcomeViewModel.class);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.signInBtn.setOnClickListener(v -> {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
|
||||
binding.email.setError(null);
|
||||
|
||||
if (allOkay()){
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we sign you in.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
Map<String, String> body = new HashMap<>();
|
||||
body.put("email", binding.email.getText().toString());
|
||||
|
||||
String password;
|
||||
if (binding.password.getText() == null) {
|
||||
password = "";
|
||||
}
|
||||
else{
|
||||
password = binding.password.getText().toString();
|
||||
}
|
||||
|
||||
body.put("password", password);
|
||||
|
||||
viewModel.loginCaregiver(body, this);
|
||||
}
|
||||
});
|
||||
|
||||
binding.registerBtn.setOnClickListener(v -> {
|
||||
@@ -39,7 +92,33 @@ public class CgSignInFragment extends Fragment {
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_cgSignInFragment_to_cgForgotPasswordFragment);
|
||||
});
|
||||
}
|
||||
|
||||
return binding.getRoot();
|
||||
private boolean allOkay() {
|
||||
boolean allOkay = true;
|
||||
|
||||
if (binding.email.getText().toString().trim().isEmpty()){
|
||||
allOkay = false;
|
||||
binding.email.setError("Please enter email.");
|
||||
}
|
||||
|
||||
if (binding.password.getText() != null && binding.password.getText().toString().trim().isEmpty()){
|
||||
allOkay = false;
|
||||
Toast.makeText(requireContext(), "Please enter password.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
return allOkay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoginSuccess(CareGiverData careGiverData, String token) {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(requireContext(), "Log in success.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogInFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.mvvm;
|
||||
|
||||
public class CgForgotPwdResult{
|
||||
public int id;
|
||||
public String principal_xid;
|
||||
public String contact_xid;
|
||||
public String availability_working_hours;
|
||||
public String availability_weekend_holiday;
|
||||
public String availability_overnight;
|
||||
public String is_suspended;
|
||||
public String is_archived;
|
||||
public String active;
|
||||
public String deleted_at;
|
||||
public String created_by;
|
||||
public String updated_by;
|
||||
public String created_at;
|
||||
public String updated_at;
|
||||
|
||||
public CgForgotPwdResult(){}
|
||||
|
||||
}
|
||||
@@ -64,4 +64,165 @@ public class CgWelcomeRepository {
|
||||
|
||||
}
|
||||
|
||||
public void verifyCgOTP(Map<String, String> body,
|
||||
WelcomeContracts.VerifyCgOTPCallback verifyCgOTPCallback){
|
||||
|
||||
apiService.verifyCgOTP(body)
|
||||
.enqueue(new Callback<CallResponse<Object>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<Object>> call, Response<CallResponse<Object>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200){
|
||||
verifyCgOTPCallback.onVerifyOTPFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
verifyCgOTPCallback.onOTPVerifies();
|
||||
}else{
|
||||
verifyCgOTPCallback.onVerifyOTPFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<Object>> call, Throwable t) {
|
||||
Log.e(TAG, "onFailure: ", t);
|
||||
verifyCgOTPCallback.onVerifyOTPFailed(t, "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void loginCaregiver(Map<String, String> body,
|
||||
WelcomeContracts.CgLoginCallback loginCallback){
|
||||
|
||||
apiService.loginCaregiver(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){
|
||||
loginCallback.onLogInFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
loginCallback.onLoginSuccess(response.body().result, response.body().token);
|
||||
}else{
|
||||
loginCallback.onLogInFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<CareGiverData>> call, Throwable t) {
|
||||
loginCallback.onLogInFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void sendForgotCodeEmail(String email,
|
||||
WelcomeContracts.ForgotPwdSentCodeCallback sentCodeCallback){
|
||||
apiService.sendForgotCodeEmail(email)
|
||||
.enqueue(new Callback<CallResponse<CgForgotPwdResult>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<CgForgotPwdResult>> call, Response<CallResponse<CgForgotPwdResult>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200 || response.body().result == null){
|
||||
sentCodeCallback.onEmailSentFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
sentCodeCallback.onEmailSentSuccess(response.body().result);
|
||||
}else{
|
||||
sentCodeCallback.onEmailSentFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<CgForgotPwdResult>> call, Throwable t) {
|
||||
sentCodeCallback.onEmailSentFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void verifyForgotOTP(Map<String, String> body,
|
||||
WelcomeContracts.VerifyForgotOTP forgotOTPCallback){
|
||||
|
||||
apiService.verifyForgotOTP(body)
|
||||
.enqueue(new Callback<CallResponse<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<String>> call, Response<CallResponse<String>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200){
|
||||
forgotOTPCallback.onOTPVerificationFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
forgotOTPCallback.onOTPVerified();
|
||||
}else{
|
||||
forgotOTPCallback.onOTPVerificationFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<String>> call, Throwable t) {
|
||||
forgotOTPCallback.onOTPVerificationFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void changeCgPassword(Map<String, RequestBody> body,
|
||||
WelcomeContracts.ChangePasswordCallback changePasswordCallback){
|
||||
|
||||
apiService.changeCgPassword(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){
|
||||
changePasswordCallback.onPasswordChangeFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
changePasswordCallback.onPasswordChanged(response.body().result);
|
||||
}else{
|
||||
changePasswordCallback.onPasswordChangeFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<CareGiverData>> call, Throwable t) {
|
||||
changePasswordCallback.onPasswordChangeFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void connectCg(Map<String, String> body,
|
||||
WelcomeContracts.ConnectCgCallback connectCgCallback){
|
||||
|
||||
apiService.connectCg(body)
|
||||
.enqueue(new Callback<CallResponse<ConnectCgResult>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<ConnectCgResult>> call, Response<CallResponse<ConnectCgResult>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200 || response.body().result == null){
|
||||
connectCgCallback.onCgConnectFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
connectCgCallback.onCgConnected(response.body().result);
|
||||
}else{
|
||||
connectCgCallback.onCgConnectFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<ConnectCgResult>> call, Throwable t) {
|
||||
connectCgCallback.onCgConnectFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,36 @@ public class CgWelcomeViewModel extends ViewModel {
|
||||
repository.registerCareGiver(body, registerCareGiverCallback);
|
||||
}
|
||||
|
||||
public void verifyCgOTP(Map<String, String> body,
|
||||
WelcomeContracts.VerifyCgOTPCallback verifyCgOTPCallback){
|
||||
repository.verifyCgOTP(body, verifyCgOTPCallback);
|
||||
}
|
||||
|
||||
public void loginCaregiver(Map<String, String> body,
|
||||
WelcomeContracts.CgLoginCallback loginCallback){
|
||||
repository.loginCaregiver(body, loginCallback);
|
||||
}
|
||||
|
||||
public void sendForgotCodeEmail(String email,
|
||||
WelcomeContracts.ForgotPwdSentCodeCallback sentCodeCallback){
|
||||
repository.sendForgotCodeEmail(email, sentCodeCallback);
|
||||
}
|
||||
|
||||
public void verifyForgotOTP(Map<String, String> body,
|
||||
WelcomeContracts.VerifyForgotOTP forgotOTPCallback){
|
||||
repository.verifyForgotOTP(body, forgotOTPCallback);
|
||||
}
|
||||
|
||||
public void changeCgPassword(Map<String, RequestBody> body,
|
||||
WelcomeContracts.ChangePasswordCallback changePasswordCallback){
|
||||
repository.changeCgPassword(body, changePasswordCallback);
|
||||
}
|
||||
|
||||
public void connectCg(Map<String, String> body,
|
||||
WelcomeContracts.ConnectCgCallback connectCgCallback){
|
||||
repository.connectCg(body, connectCgCallback);
|
||||
}
|
||||
|
||||
public ArrayList<String> loadCountryCodeDropDown(Context context) {
|
||||
|
||||
ArrayList<String> countryCodeList = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.mvvm;
|
||||
|
||||
public class ConnectCgResult{
|
||||
public int id;
|
||||
public String patient_xid;
|
||||
public String care_giver_xid;
|
||||
public String link_code;
|
||||
public int is_connected;
|
||||
public String active;
|
||||
public String deleted_at;
|
||||
public String created_by;
|
||||
public String updated_by;
|
||||
public String created_at;
|
||||
public String updated_at;
|
||||
|
||||
public ConnectCgResult(){}
|
||||
}
|
||||
@@ -292,6 +292,15 @@ public class CheckMailFragment extends Fragment implements WelcomeContracts.Veri
|
||||
return encoded_email + "@" + arr[1];
|
||||
}
|
||||
|
||||
private void clearInputs() {
|
||||
binding.otp1.setText(null);
|
||||
binding.otp2.setText(null);
|
||||
binding.otp3.setText(null);
|
||||
binding.otp4.setText(null);
|
||||
|
||||
binding.otp1.requestFocus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOTPVerified() {
|
||||
progressDialog.dismiss();
|
||||
@@ -320,6 +329,8 @@ public class CheckMailFragment extends Fragment implements WelcomeContracts.Veri
|
||||
|
||||
user_id = otpSentResponse.principal_xid;
|
||||
Toast.makeText(requireContext(), "OTP resent successfully.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
clearInputs();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -471,6 +471,8 @@ public class LocationFragment extends Fragment implements OnMapReadyCallback,
|
||||
binding.stateSpinner.selectItemByIndex(state_index);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
binding.countrySpinner.clearSelectedItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/pin"
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg"
|
||||
@@ -96,9 +96,9 @@
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="numberPassword"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:maxLength="4"
|
||||
android:maxLength="15"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
@@ -177,7 +177,7 @@
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/confirm_pin"
|
||||
android:id="@+id/confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg"
|
||||
@@ -195,9 +195,9 @@
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="numberPassword"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:maxLength="4"
|
||||
android:maxLength="15"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -56,20 +56,11 @@
|
||||
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" />
|
||||
|
||||
458
app/src/main/res/layout/cg_profile_progress_fragment.xml
Normal file
458
app/src/main/res/layout/cg_profile_progress_fragment.xml
Normal file
@@ -0,0 +1,458 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:toola="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingStart="0dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
toola:text="Aditya Gaikwad"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_20ssp"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/_15sdp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_medic"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="18dp"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:layout_marginVertical="@dimen/_5sdp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/personal_information"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/add_contact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_medic"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="18dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:layout_marginVertical="@dimen/_5sdp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/family_and_friends_contacts"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/medic_reminder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/med_reminder_img"
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_timer"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="15dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:layout_marginVertical="@dimen/_5sdp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/medication_reminder"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/medic_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/med_info_img"
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_medic"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="18dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:layout_marginVertical="@dimen/_5sdp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/medical_information"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/set_up_routine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setup_routine_img"
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_calender"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="16dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:layout_marginVertical="@dimen/_5sdp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/setup_routine"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/freq_apps"
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_apps"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="18dp"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:background="@color/color_accent"
|
||||
|
||||
android:layout_marginVertical="@dimen/_5sdp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/frequently_used_apps"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/geo_fencing"
|
||||
android:layout_width="@dimen/_50sdp"
|
||||
android:layout_height="@dimen/_50sdp"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:background="@drawable/ic_progress_bg"
|
||||
|
||||
app:srcCompat="@drawable/ic_apps"
|
||||
app:tint="@color/color_primary"
|
||||
|
||||
android:padding="18dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/create_geo_fence"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/proceed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginVertical="20dp"
|
||||
android:text="@string/proceed"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
|
||||
android:drawableEnd="@drawable/ic_forward_error"
|
||||
android:drawablePadding="15dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -275,8 +275,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pwd_info"
|
||||
android:layout_width="@dimen/_15sdp"
|
||||
android:layout_height="@dimen/_15sdp"
|
||||
android:layout_width="@dimen/_20sdp"
|
||||
android:layout_height="@dimen/_20sdp"
|
||||
android:contentDescription="@string/info"
|
||||
|
||||
android:src="@drawable/ic_info"
|
||||
@@ -327,6 +327,8 @@
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="textPassword"
|
||||
|
||||
android:maxLength="15"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/pin"
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
@@ -135,22 +135,22 @@
|
||||
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"
|
||||
<!-- <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"
|
||||
/>
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/forgot_password"
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/pwd_bg"
|
||||
>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardCornerRadius="@dimen/_5sdp"
|
||||
app:cardBackgroundColor="@color/pwd_bg">
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
android:text="@string/password_details"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:padding="10dp"
|
||||
android:text="@string/password_details"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_13ssp"
|
||||
|
||||
/>
|
||||
android:padding="10dp"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -2,7 +2,7 @@
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/welcome_nav_graph"
|
||||
app:startDestination="@id/splashFragment">
|
||||
app:startDestination="@id/cgSignInFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/welcomeFragment"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<string name="enter_email_address">Enter email address</string>
|
||||
<string name="submit">Submit</string>
|
||||
<string name="check_your_mail">Check your mail</string>
|
||||
<string name="please_enter_the_temporary_pin_recieved_at_email_address_at_k_gmail_com">Please enter the temporary pin recieved at email address</string>
|
||||
<string name="please_enter_the_temporary_pin_recieved_at_email_address_at_k_gmail_com">Please enter the temporary pin received at email address</string>
|
||||
<string name="didn_t_your_receive_any_code">Didn\'t your receive any code?</string>
|
||||
<string name="resend">Resend</string>
|
||||
<string name="change_your_pin">Change your Pin</string>
|
||||
@@ -292,5 +292,6 @@
|
||||
<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>
|
||||
<string name="create_geo_fence">Create Geo Fence</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user