.
This commit is contained in:
27
.idea/deploymentTargetDropDown.xml
generated
27
.idea/deploymentTargetDropDown.xml
generated
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="5203ae2be8ec4353" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetsSelectedWithDialog>
|
||||
<targetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\adity\.android\avd\Samsung_Z3_flip_API_34.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetsSelectedWithDialog>
|
||||
</component>
|
||||
</project>
|
||||
@@ -99,6 +99,9 @@ dependencies {
|
||||
implementation 'com.daimajia.easing:library:2.4@aar'
|
||||
implementation 'com.daimajia.androidanimations:library:2.4@aar'
|
||||
|
||||
// biometrics
|
||||
implementation "androidx.biometric:biometric:1.1.0"
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
|
||||
@@ -58,6 +58,15 @@
|
||||
android:value="" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".welcome.welcomecg.fragments.CgAuthActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.ssb.simplitend.fileProvider"
|
||||
|
||||
@@ -28,8 +28,10 @@ public abstract class AppUtil {
|
||||
|
||||
// fields
|
||||
public static final String USER_DETAILS = "user_details";
|
||||
public static final String CAREGIVER_DETAILS = "user_details";
|
||||
|
||||
public static final String USER_TOKEN = "user_token";
|
||||
public static final String CAREGIVER_TOKEN = "user_token";
|
||||
public static final String PATIENT_UID = "patient_uid";
|
||||
|
||||
// util functions
|
||||
@@ -136,9 +138,6 @@ public abstract class AppUtil {
|
||||
|
||||
Log.d(TAG, "saveToken: user token saved successful");
|
||||
|
||||
// TODO: 17-07-2023 remove below line afterwards
|
||||
Log.d(TAG, "saveUserCache: " + token);
|
||||
|
||||
}
|
||||
|
||||
public static String getUserToken(Context context){
|
||||
@@ -151,4 +150,16 @@ public abstract class AppUtil {
|
||||
return sp.getInt(PATIENT_UID, -1);
|
||||
}
|
||||
|
||||
public static void saveCgData(String token, Context context){
|
||||
SharedPreferences sp = context.getSharedPreferences(CAREGIVER_DETAILS, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
|
||||
editor.putString(CAREGIVER_TOKEN, token);
|
||||
|
||||
editor.apply();
|
||||
|
||||
Log.d(TAG, "saveToken: caregiver token saved successful");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,4 +50,4 @@ public abstract class RetrofitHelper {
|
||||
return retrofit;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ssb.simplitend.patient_dashboard.fragments;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -11,7 +12,10 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.databinding.PatientDashboardFragmentBinding;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.welcome.activities.WelcomeActivity;
|
||||
|
||||
public class PatientDashboardFragment extends Fragment {
|
||||
|
||||
@@ -36,5 +40,17 @@ public class PatientDashboardFragment extends Fragment {
|
||||
binding.chats.setOnClickListener(v ->
|
||||
Navigation.findNavController(v).navigate(R.id.action_CPDashboardFragment_to_chatListFragment)
|
||||
);
|
||||
|
||||
binding.sosBtn.setOnClickListener(v -> {
|
||||
// fake sign out
|
||||
// TODO: 08-08-2023 remove this
|
||||
|
||||
AppUtil.saveUserCache(null, -1, requireContext());
|
||||
|
||||
Intent intent = new Intent(requireActivity(), WelcomeActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,15 @@ public class ProfileProgressFragment extends Fragment implements ProfileContract
|
||||
binding.setupRoutineImg.setPadding(15, 15, 15, 15);
|
||||
}
|
||||
|
||||
String btn_text;
|
||||
if (profile_progress == 4){
|
||||
btn_text = "Proceed";
|
||||
}else{
|
||||
btn_text = "Skip";
|
||||
}
|
||||
|
||||
binding.proceed.setText(btn_text);
|
||||
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.ssb.simplitend.welcome.activities;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.ssb.simplitend.databinding.ActivityWelcomeBinding;
|
||||
|
||||
public class WelcomeActivity extends AppCompatActivity {
|
||||
@@ -11,12 +11,16 @@ public class WelcomeActivity extends AppCompatActivity {
|
||||
// View binding
|
||||
protected ActivityWelcomeBinding binding;
|
||||
|
||||
private static final String TAG = "aditya";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// setting screen layout
|
||||
binding = ActivityWelcomeBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import static android.hardware.biometrics.BiometricManager.Authenticators.BIOMETRIC_WEAK;
|
||||
import static android.hardware.biometrics.BiometricManager.Authenticators.DEVICE_CREDENTIAL;
|
||||
import static androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.biometric.BiometricManager;
|
||||
import androidx.biometric.BiometricPrompt;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.daimajia.androidanimations.library.Techniques;
|
||||
import com.daimajia.androidanimations.library.YoYo;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.caregiverdashboard.CaregiverDashActivity;
|
||||
import com.ssb.simplitend.databinding.CgAuthFragmentBinding;
|
||||
|
||||
public class CgAuthActivity extends AppCompatActivity {
|
||||
|
||||
protected CgAuthFragmentBinding binding;
|
||||
|
||||
private BiometricManager biometricManager;
|
||||
private BiometricPrompt biometricPrompt;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = CgAuthFragmentBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.fingerprintView.setOnClickListener(v -> {
|
||||
|
||||
authenticateBiometrics();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
biometricManager = BiometricManager.from(this);
|
||||
|
||||
biometricPrompt = new BiometricPrompt(this, ContextCompat.getMainExecutor(this),
|
||||
new BiometricPrompt.AuthenticationCallback() {
|
||||
@Override
|
||||
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) {
|
||||
super.onAuthenticationError(errorCode, errString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
|
||||
super.onAuthenticationSucceeded(result);
|
||||
gotoCgDash();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationFailed() {
|
||||
super.onAuthenticationFailed();
|
||||
}
|
||||
});
|
||||
|
||||
configureBiometrics();
|
||||
|
||||
// four digit pin catch
|
||||
binding.pin.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (editable.length() == 4) {
|
||||
AppUtil.closeKeyboard(CgAuthActivity.this);
|
||||
|
||||
if (editable.toString().equals("0000")) {
|
||||
gotoCgDash();
|
||||
} else {
|
||||
YoYo.with(Techniques.Wobble)
|
||||
.playOn(binding.pin);
|
||||
|
||||
binding.pin.setError("Invalid pin.");
|
||||
binding.pin.setText(null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void authenticateBiometrics() {
|
||||
if (biometricManager == null) return;
|
||||
|
||||
int biometric_status = biometricManager.canAuthenticate(BIOMETRIC_STRONG | BiometricManager.Authenticators.BIOMETRIC_WEAK);
|
||||
|
||||
if (biometric_status == BiometricManager.BIOMETRIC_SUCCESS) {
|
||||
// go ahead and do it.
|
||||
biometricPrompt.authenticate(new BiometricPrompt.PromptInfo.Builder()
|
||||
.setTitle("Unlock Simplitend")
|
||||
.setConfirmationRequired(false)
|
||||
.setNegativeButtonText("Cancel")
|
||||
.build());
|
||||
} else if (biometric_status == BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED){
|
||||
// no fingerprints enrolled
|
||||
|
||||
AppUtil.showAlert(this,
|
||||
"No biometrics added.",
|
||||
"No fingerprints are registered on your device.\nKindly add biometrics to authenticate.",
|
||||
"Go to settings",
|
||||
((dialogInterface, i) -> {
|
||||
|
||||
final Intent enrollIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
|
||||
enrollIntent = new Intent(Settings.ACTION_BIOMETRIC_ENROLL);
|
||||
enrollIntent.putExtra(Settings.EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED, BIOMETRIC_STRONG);
|
||||
}else{
|
||||
enrollIntent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
|
||||
}
|
||||
|
||||
startActivity(enrollIntent);
|
||||
|
||||
}),
|
||||
"No thanks",
|
||||
((dialogInterface, i) -> {
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void configureBiometrics() {
|
||||
|
||||
if (biometricManager == null) return;
|
||||
|
||||
switch (biometricManager.canAuthenticate(BIOMETRIC_STRONG)) {
|
||||
case BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE:
|
||||
case BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE:
|
||||
binding.fingerprintOr.setVisibility(View.GONE);
|
||||
binding.fingerprintView.setVisibility(View.GONE);
|
||||
break;
|
||||
case BiometricManager.BIOMETRIC_SUCCESS:
|
||||
case BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED:
|
||||
binding.fingerprintOr.setVisibility(View.VISIBLE);
|
||||
binding.fingerprintView.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void gotoCgDash() {
|
||||
Intent intent = new Intent(CgAuthActivity.this, CaregiverDashActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
|
||||
startActivity(intent);
|
||||
CgAuthActivity.this.finish();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
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;
|
||||
@@ -9,21 +12,32 @@ 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.ConnectCaregiverFragmentBinding;
|
||||
import com.ssb.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
import com.ssb.simplitend.welcome.welcomecg.mvvm.ConnectCgResult;
|
||||
|
||||
public class CgConnectFragment extends Fragment {
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CgConnectFragment extends Fragment implements WelcomeContracts.ConnectCgCallback{
|
||||
|
||||
protected ConnectCaregiverFragmentBinding binding;
|
||||
|
||||
public static final String CAREGIVER_EMAIL = "cg_email";
|
||||
public static final String CAREGIVER_PASSWORD = "caregiver_pwd";
|
||||
|
||||
private String cg_email, cg_password;
|
||||
private String cg_email;
|
||||
|
||||
private CgWelcomeViewModel viewModel;
|
||||
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
public CgConnectFragment() {
|
||||
// required
|
||||
@@ -34,13 +48,49 @@ public class CgConnectFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = ConnectCaregiverFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(CgWelcomeViewModel.class);
|
||||
|
||||
initViews();
|
||||
|
||||
clickEvents();
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void clickEvents() {
|
||||
binding.connectBtn.setOnClickListener(v -> {
|
||||
if (binding.code.getText().toString().length() != 4){
|
||||
binding.code.setError("Invalid code.");
|
||||
return;
|
||||
}
|
||||
|
||||
connectCG();
|
||||
});
|
||||
}
|
||||
|
||||
private void connectCG() {
|
||||
if (cg_email == null){
|
||||
Toast.makeText(requireContext(), "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
};
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we verify your code.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
Map<String, String> body = new HashMap<>();
|
||||
|
||||
body.put("email", cg_email);
|
||||
body.put("code", binding.code.getText().toString());
|
||||
|
||||
viewModel.connectCg(body, this);
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
|
||||
progressDialog = new ProgressDialog(requireContext());
|
||||
|
||||
// showing gif
|
||||
Glide.with(binding.image)
|
||||
.asGif()
|
||||
@@ -48,6 +98,25 @@ public class CgConnectFragment extends Fragment {
|
||||
.placeholder(R.drawable.forgot_pin_email_img)
|
||||
.into(binding.image);
|
||||
|
||||
binding.code.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (editable.length() == 4){
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,20 +126,29 @@ public class CgConnectFragment extends Fragment {
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
if (bundle == null ||
|
||||
bundle.getString(CAREGIVER_EMAIL, null) == null ||
|
||||
bundle.getString(CAREGIVER_PASSWORD, null) == null) {
|
||||
bundle.getString(CAREGIVER_EMAIL, 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();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCgConnected(ConnectCgResult result) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "Caregiver connected.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCgConnectFailed(Throwable throwable, String message) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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_cgHowToSetUpFragment_to_cgSignInFragment));
|
||||
binding.nextBtn.setOnClickListener(v -> Navigation.findNavController(v).navigate(R.id.action_cgHowToSetUpFragment_to_cgRegisterFragment));
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@ public class CgOnBoardFragment extends Fragment {
|
||||
});
|
||||
|
||||
binding.getsStarted.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgHowToSetUpFragment);
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgSignInFragment);
|
||||
});
|
||||
|
||||
binding.skip.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgHowToSetUpFragment);
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgOnBoardFragment_to_cgSignInFragment);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -427,7 +427,6 @@ public class CgRegisterFragment extends Fragment implements WelcomeContracts.Reg
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(CAREGIVER_EMAIL, careGiverData.email);
|
||||
bundle.putString(CAREGIVER_PASSWORD, mPassword);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ssb.simplitend.welcome.welcomecg.fragments;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -85,7 +86,7 @@ public class CgSignInFragment extends Fragment implements WelcomeContracts.CgLog
|
||||
});
|
||||
|
||||
binding.registerBtn.setOnClickListener(v -> {
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgSignInFragment_to_cgRegisterFragment);
|
||||
Navigation.findNavController(v).navigate(R.id.action_cgSignInFragment_to_cgHowToSetUpFragment);
|
||||
});
|
||||
|
||||
binding.forgotPassword.setOnClickListener(v -> {
|
||||
@@ -114,6 +115,14 @@ public class CgSignInFragment extends Fragment implements WelcomeContracts.CgLog
|
||||
public void onLoginSuccess(CareGiverData careGiverData, String token) {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(requireContext(), "Log in success.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
AppUtil.saveCgData(token, requireContext());
|
||||
|
||||
Intent intent = new Intent(requireActivity(), CgAuthActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
|
||||
requireActivity().finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,7 +68,12 @@ public class ContactListFragment extends Fragment {
|
||||
|
||||
private void clickEvents() {
|
||||
|
||||
binding.backBtn.setOnClickListener(v -> Navigation.findNavController(v).popBackStack());
|
||||
binding.backBtn.setOnClickListener(v -> {
|
||||
if (Navigation.findNavController(v).getPreviousBackStackEntry() != null){
|
||||
Navigation.findNavController(v).popBackStack();
|
||||
Toast.makeText(requireContext(), "Back done", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
binding.createContact.setOnClickListener(v ->
|
||||
{
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.ssb.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -13,9 +15,20 @@ import androidx.navigation.NavOptions;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.ssb.simplitend.R;
|
||||
import com.ssb.simplitend.apputils.AppUtil;
|
||||
import com.ssb.simplitend.apputils.RetrofitHelper;
|
||||
import com.ssb.simplitend.databinding.SplashFragmentBinding;
|
||||
import com.ssb.simplitend.patient_dashboard.DashBoardActivity;
|
||||
import com.ssb.simplitend.patientprofile.PatientProfileAPIService;
|
||||
import com.ssb.simplitend.patientprofile.ProfileContracts;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.ssb.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
|
||||
public class SplashFragment extends Fragment {
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
public class SplashFragment extends Fragment implements ProfileContracts.ProfileProgressCallback{
|
||||
|
||||
// view binding
|
||||
protected SplashFragmentBinding binding;
|
||||
@@ -25,6 +38,59 @@ public class SplashFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = SplashFragmentBinding.inflate(inflater, container, false);
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
checkIfAhyUser();
|
||||
}
|
||||
|
||||
private void checkIfAhyUser() {
|
||||
String token = AppUtil.getUserToken(requireContext());
|
||||
if (token != null && !token.isEmpty()){
|
||||
// user is already logged in as PATIENT
|
||||
// thus, checking if the logged in PATIENT has already added CAREGIVER
|
||||
|
||||
PatientProfileAPIService apiService = RetrofitHelper.getRetrofit().create(PatientProfileAPIService.class);
|
||||
|
||||
apiService.getUsrProfileProgress("Bearer " + token)
|
||||
.enqueue(new Callback<CallResponse<PatientData>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<PatientData>> call, Response<CallResponse<PatientData>> response) {
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200 || response.body().result == null) {
|
||||
onProfileProgressFetchFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
onProfileProgressFetched(response.body().result);
|
||||
} else {
|
||||
onProfileProgressFetchFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<PatientData>> call, Throwable t) {
|
||||
onProfileProgressFetchFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
// no user has logged in
|
||||
gotoWelcomeFragment();
|
||||
}
|
||||
}
|
||||
|
||||
private void gotoDashBoard(){
|
||||
Intent intent = new Intent(requireActivity(), DashBoardActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
}
|
||||
|
||||
public void gotoWelcomeFragment(){
|
||||
new Handler().postDelayed(() -> {
|
||||
|
||||
NavOptions navOptions = new NavOptions.Builder()
|
||||
@@ -35,7 +101,28 @@ public class SplashFragment extends Fragment {
|
||||
.navigate(R.id.action_splashFragment_to_welcomeFragment, null, navOptions);
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
return binding.getRoot();
|
||||
@Override
|
||||
public void onProfileProgressFetched(PatientData patientData) {
|
||||
if (patientData.isCareGiverLink == 1){
|
||||
// user has already added caregiver as a contact
|
||||
// thus, sending it to dashboard
|
||||
gotoDashBoard();
|
||||
}else{
|
||||
// user has not added caregiver contact.
|
||||
// thus, sending it to contact list to add caregiver contact.
|
||||
NavOptions navOptions = new NavOptions.Builder()
|
||||
.setPopUpTo(R.id.splashFragment, true)
|
||||
.build();
|
||||
|
||||
Navigation.findNavController(binding.mainIcon)
|
||||
.navigate(R.id.action_splashFragment_to_contactListFragment, null, navOptions);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProfileProgressFetchFailed(Throwable t, String message) {
|
||||
Toast.makeText(requireContext(), "Couldn't connect.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
120
app/src/main/res/layout/cg_auth_fragment.xml
Normal file
120
app/src/main/res/layout/cg_auth_fragment.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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"
|
||||
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"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="@dimen/_35sdp"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="10dp"
|
||||
|
||||
android:hint="@string/enter_login_pin"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:maxLength="4"
|
||||
|
||||
android:drawableStart="@drawable/ic_lock"
|
||||
android:drawablePadding="15dp"
|
||||
|
||||
android:autofillHints="password"
|
||||
android:inputType="numberPassword"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fingerprint_or"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/or"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
|
||||
android:layout_marginVertical="@dimen/_15sdp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fingerprint_view"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
|
||||
android:src="@drawable/ic_info"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/unlock_with_fingerprint"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="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">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/ll">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -20,119 +20,100 @@
|
||||
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"/>
|
||||
android:layout_marginBottom="15dp"
|
||||
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:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:text="@string/accept_your_loved_one_s_invitation_to_connect"
|
||||
|
||||
android:textAlignment="center"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
|
||||
/>
|
||||
|
||||
<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"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/enter_your_email_or_phone_number"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp" />
|
||||
|
||||
<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:autofillHints="emailAddress"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:drawableStart="@drawable/ic_email_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
android:autofillHints="emailAddress"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
|
||||
android:enabled="false"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/enter_your_email"
|
||||
android:inputType="textEmailAddress"
|
||||
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="15dp"
|
||||
|
||||
android:paddingVertical="15sp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textColorHint="#5B5B5B" />
|
||||
|
||||
<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"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/enter_code_sent_on_your_email"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_16ssp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
<EditText
|
||||
android:id="@+id/code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="password"
|
||||
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
android:drawableStart="@drawable/ic_lock_outline"
|
||||
android:drawablePadding="20dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/enter_your_code"
|
||||
android:inputType="number"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
android:maxLength="4"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="15sp"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B" />
|
||||
|
||||
>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -147,21 +128,20 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sign_in_btn"
|
||||
android:id="@+id/connect_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="15dp"
|
||||
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"
|
||||
/>
|
||||
android:textColor="@color/white_bg"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="25dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/register_btn"
|
||||
@@ -172,8 +152,8 @@
|
||||
android:padding="5dp"
|
||||
|
||||
android:text="@string/didn_t_receive_code_resend"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
@@ -440,23 +440,22 @@
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/next_btn"
|
||||
android:id="@+id/sos_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:text="@string/sos"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="true"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:paddingVertical="15dp"
|
||||
android:text="@string/sos"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/white_bg"
|
||||
|
||||
/>
|
||||
app:backgroundTint="@color/color_primary"
|
||||
|
||||
app:cornerRadius="15dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -120,18 +120,41 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
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"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
android:text="@string/family_and_friends_contacts"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
android:layout_toStartOf="@id/btn_1"
|
||||
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_1"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="#043E61" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -179,18 +202,38 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
android:text="@string/medication_reminder"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
android:text="@string/medication_reminder"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
android:layout_toStartOf="@id/btn_2"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_2"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="#043E61" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -238,18 +281,38 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
android:text="@string/medical_information"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
android:text="@string/medical_information"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
android:layout_toStartOf="@id/btn_3"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_3"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="#043E61" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -297,18 +360,38 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
android:text="@string/setup_routine"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
android:text="@string/setup_routine"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
android:layout_toStartOf="@id/btn_4"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_4"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="#043E61" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -346,18 +429,38 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
android:text="@string/frequently_used_apps"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginVertical="17dp"
|
||||
android:text="@string/frequently_used_apps"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
/>
|
||||
android:layout_marginVertical="17dp"
|
||||
|
||||
android:layout_toStartOf="@id/btn_5"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_5"
|
||||
android:layout_width="@dimen/_25sdp"
|
||||
android:layout_height="@dimen/_25sdp"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:src="@drawable/ic_next"
|
||||
app:tint="#043E61" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -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/cgSignInFragment">
|
||||
app:startDestination="@id/splashFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/welcomeFragment"
|
||||
@@ -195,6 +195,9 @@
|
||||
<action
|
||||
android:id="@+id/action_splashFragment_to_welcomeFragment"
|
||||
app:destination="@id/welcomeFragment" />
|
||||
<action
|
||||
android:id="@+id/action_splashFragment_to_contactListFragment"
|
||||
app:destination="@id/contactListFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/medicalInfoFragment"
|
||||
@@ -229,27 +232,27 @@
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgOnBoardFragment"
|
||||
android:label="CgOnBoardFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgOnBoardFragment_to_cgHowToSetUpFragment"
|
||||
app:destination="@id/cgHowToSetUpFragment" />
|
||||
android:id="@+id/action_cgOnBoardFragment_to_cgSignInFragment"
|
||||
app:destination="@id/cgSignInFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgHowToSetUpFragment"
|
||||
android:name="com.ssb.simplitend.welcome.welcomecg.fragments.CgHowToSetUpFragment"
|
||||
android:label="CgHowToSetUpFragment" >
|
||||
<action
|
||||
android:id="@+id/action_cgHowToSetUpFragment_to_cgSignInFragment"
|
||||
app:destination="@id/cgSignInFragment" />
|
||||
android:id="@+id/action_cgHowToSetUpFragment_to_cgRegisterFragment"
|
||||
app:destination="@id/cgRegisterFragment" />
|
||||
</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" />
|
||||
<action
|
||||
android:id="@+id/action_cgSignInFragment_to_cgHowToSetUpFragment"
|
||||
app:destination="@id/cgHowToSetUpFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/cgRegisterFragment"
|
||||
|
||||
@@ -293,5 +293,9 @@
|
||||
<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>
|
||||
<string name="unlock_with_faceid">Unlock with FaceID</string>
|
||||
<string name="or">OR</string>
|
||||
<string name="unlock_with_fingerprint">Unlock with Fingerprint or FaceID</string>
|
||||
<string name="enter_login_pin">Enter Login pin</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user