.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package com.app.simplitend.appblocking;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.provider.Settings;
|
||||
@@ -270,6 +272,20 @@ public class FUAActivity extends AppCompatActivity {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
// maps
|
||||
try {
|
||||
Intent mapsIntent = new Intent(android.content.Intent.ACTION_VIEW,
|
||||
Uri.parse("https://www.google.com/maps/dir/?api=1&destination=" + "19,20" + "&travelmode=walking"));
|
||||
|
||||
ActivityInfo info = mapsIntent.resolveActivityInfo(getPackageManager(), 0);
|
||||
if (info != null && info.packageName != null){
|
||||
appsName.remove(info.packageName);
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
}
|
||||
|
||||
mySharedPref.setArrayList("APP_LIST", appsName);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,20 @@ public abstract class AppUtil {
|
||||
return returnString.toString();
|
||||
}
|
||||
|
||||
public static String formatDate(@NonNull String fromFormat,
|
||||
@NonNull String toFormat,
|
||||
String fromDate){
|
||||
SimpleDateFormat fromSdf = new SimpleDateFormat(fromFormat, Locale.getDefault());
|
||||
SimpleDateFormat toSdf = new SimpleDateFormat(toFormat, Locale.getDefault());
|
||||
|
||||
try {
|
||||
Date date = fromSdf.parse(fromDate);
|
||||
return toSdf.format(date);
|
||||
}catch (Exception e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void callPhone(Activity activity, String phone_number){
|
||||
if (activity.checkSelfPermission(Manifest.permission.CALL_PHONE) == PackageManager.PERMISSION_GRANTED){
|
||||
Intent intent = new Intent(Intent.ACTION_CALL, Uri.fromParts("tel",
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.onesignal.Continue;
|
||||
import com.onesignal.OneSignal;
|
||||
import com.onesignal.debug.LogLevel;
|
||||
import com.app.simplitend.R;
|
||||
import com.stripe.android.PaymentConfiguration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package com.app.simplitend.caregiverdashboard.activities;
|
||||
|
||||
import static com.app.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.ACTIVITY_F;
|
||||
import static com.app.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.CONTACTS_F;
|
||||
import static com.app.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.MED_INFO_F;
|
||||
import static com.app.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.MED_REMINDER_F;
|
||||
import static com.app.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.WHICH_FRAGMENT;
|
||||
import static com.app.simplitend.cg_geofencing.CgGeoFencingActivity.GEOFENCE_DETAILS_KEY;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -7,22 +14,25 @@ import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.CaregiverDataCache;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.CaregiverMainViewModel;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.CgHomeContracts;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.models.GeoFenceDetails;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.CaregiverDataCache;
|
||||
import com.app.simplitend.cg_geofencing.CgGeoFencingActivity;
|
||||
import com.app.simplitend.databinding.ActivityCgProfileProgressBinding;
|
||||
import com.app.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
|
||||
import static com.app.simplitend.caregiverdashboard.activities.PatientProfileShowerActivity.*;
|
||||
import static com.app.simplitend.cg_geofencing.CgGeoFencingActivity.GEOFENCE_DETAILS_KEY;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.load.resource.gif.GifDrawable;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
|
||||
public class CgProfileProgressActivity extends AppCompatActivity implements CgHomeContracts.GetGeoFenceCallback {
|
||||
|
||||
@@ -44,6 +54,34 @@ public class CgProfileProgressActivity extends AppCompatActivity implements CgHo
|
||||
viewModel = new ViewModelProvider(this).get(CaregiverMainViewModel.class);
|
||||
progressDialog = new ProgressDialog(this);
|
||||
|
||||
Glide.with(this)
|
||||
.asGif()
|
||||
.load(R.raw.done_anim_primary)
|
||||
.listener(new RequestListener<GifDrawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(GifDrawable resource, Object model, Target<GifDrawable> target, DataSource dataSource, boolean isFirstResource) {
|
||||
if (resource == null) return false;
|
||||
|
||||
resource.setLoopCount(1);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.into(binding.animIv);
|
||||
|
||||
binding.linkBtn.setOnClickListener(v -> {
|
||||
binding.paySuccessCompleteView.setVisibility(View.GONE);
|
||||
binding.loadingView.setVisibility(View.VISIBLE);
|
||||
syncPatientData();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void syncPatientData() {
|
||||
startAnimation();
|
||||
|
||||
new Handler().postDelayed(() -> {
|
||||
@@ -58,7 +96,6 @@ public class CgProfileProgressActivity extends AppCompatActivity implements CgHo
|
||||
clickEvents();
|
||||
}), false);
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
|
||||
private void startAnimation() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.app.simplitend.cg_subscription.mvp.SubscriptionCredentials;
|
||||
import com.app.simplitend.cg_subscription.mvp.SubscriptionPresenter;
|
||||
import com.app.simplitend.databinding.CgSubscriptionLayoutBinding;
|
||||
import com.app.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.stripe.android.PaymentConfiguration;
|
||||
import com.stripe.android.paymentsheet.PaymentSheet;
|
||||
import com.stripe.android.paymentsheet.PaymentSheetResult;
|
||||
|
||||
@@ -43,7 +42,7 @@ import okhttp3.RequestBody;
|
||||
public class CgSubscriptionActivity extends AppCompatActivity
|
||||
implements SubscriptionContracts.GetSubPlansCallback,
|
||||
SubscriptionContracts.PaySubscriptionCallback,
|
||||
SubscriptionContracts.CreateSubscriptionCallback, SubscriptionContracts.GetCurrentPlanCallback {
|
||||
SubscriptionContracts.CreateSubscriptionCallback, SubscriptionContracts.GetCurrentPlanCallback, SubscriptionContracts.CancelSubscriptionCallback {
|
||||
|
||||
private static final String TAG = "CgSubscriptionActivity";
|
||||
|
||||
@@ -59,7 +58,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
private CareGiverData careGiverData;
|
||||
|
||||
private String payment_intent_id, stripe_price_id;
|
||||
private String current_subscription_plan_id;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@@ -76,16 +75,16 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData -> {
|
||||
this.careGiverData = careGiverData;
|
||||
|
||||
if (careGiverData != null){
|
||||
if (careGiverData.isCaregiverTakeSubscription != 1){
|
||||
if (careGiverData != null) {
|
||||
if (careGiverData.isCaregiverTakeSubscription != 1) {
|
||||
// not subscribed thus, load plans
|
||||
loadPlans();
|
||||
paymentSheet = new PaymentSheet(this, this::onPaymentSheetResult);
|
||||
}else{
|
||||
paymentSheet = new PaymentSheet(this, this::onPaymentSheetResult);
|
||||
} else {
|
||||
// Already subscribed thus, loading current plans
|
||||
loadCurrentPlans();
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
binding.plansView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@@ -98,8 +97,8 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
private void loadCurrentPlans() {
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
|
||||
if (careGiverData1 == null){
|
||||
|
||||
if (careGiverData1 == null) {
|
||||
binding.plansView.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
@@ -110,8 +109,9 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
progressDialog.show();
|
||||
|
||||
String token = "Bearer " + AppUtil.getCgToken(this);
|
||||
presenter.getCurrentSubscriptionPlan(careGiverData.caregiver_xid,
|
||||
presenter.getCurrentSubscriptionPlan(careGiverData.caregiver_xid,
|
||||
token, this);
|
||||
|
||||
}), true);
|
||||
}
|
||||
|
||||
@@ -119,14 +119,28 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
binding.makePayment.setOnClickListener(view -> {
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
if (careGiverData1 != null){
|
||||
if (careGiverData.isCaregiverTakeSubscription == 1){
|
||||
if (careGiverData1 != null) {
|
||||
if (careGiverData.isCaregiverTakeSubscription == 1) {
|
||||
// no sub
|
||||
Toast.makeText(this, "Cancel subscription", Toast.LENGTH_SHORT).show();
|
||||
}else{
|
||||
payForSubscription();
|
||||
if (current_subscription_plan_id != null){
|
||||
AppUtil.showAlert(this,
|
||||
"Cancel subscription",
|
||||
"Are you sure you want to cancel the current subscribed plan?\nThis will stop the recurring payments",
|
||||
getString(R.string.no),
|
||||
((dialogInterface, i) -> {}),
|
||||
getString(R.string.yes),
|
||||
((dialogInterface, i) -> {
|
||||
// yes click
|
||||
cancelSubscription();
|
||||
}));
|
||||
}else{
|
||||
Toast.makeText(this, "Please try again later.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
payForSubscription(); // uses payment sheet
|
||||
// showCardDetailsWidget(); // uses custom elements
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
Toast.makeText(this, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}), true);
|
||||
@@ -143,16 +157,15 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
binding.retry.setOnClickListener(v -> {
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
|
||||
if (careGiverData != null){
|
||||
careGiverData.isCaregiverTakeSubscription = 0;
|
||||
if (careGiverData.isCaregiverTakeSubscription != 1){
|
||||
|
||||
if (careGiverData != null) {
|
||||
if (careGiverData.isCaregiverTakeSubscription != 1) {
|
||||
// no sub
|
||||
loadPlans();
|
||||
}else{
|
||||
} else {
|
||||
loadCurrentPlans();
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
Toast.makeText(this, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}), true);
|
||||
@@ -160,24 +173,40 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
}
|
||||
|
||||
private void cancelSubscription() {
|
||||
if (current_subscription_plan_id == null){
|
||||
Toast.makeText(this, "Please try again later.", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
progressDialog.setTitle("Please wait...");
|
||||
progressDialog.setMessage("while we cancel your subscription");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
|
||||
presenter.cancelSubscription(current_subscription_plan_id,
|
||||
AppUtil.getCgToken(this),
|
||||
this);
|
||||
}
|
||||
|
||||
private void payForSubscription() {
|
||||
if (careGiverData == null || subscriptionPlans == null) {
|
||||
Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!binding.monthCheck.isSelected() && !binding.yearCheck.isSelected()){
|
||||
if (!binding.monthCheck.isSelected() && !binding.yearCheck.isSelected()) {
|
||||
Toast.makeText(this, "Please select a plan", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
int position = 0;
|
||||
|
||||
if (binding.yearCheck.isSelected()){
|
||||
if (binding.yearCheck.isSelected()) {
|
||||
position = 1;
|
||||
}
|
||||
|
||||
if (position >= subscriptionPlans.size()){
|
||||
if (position >= subscriptionPlans.size()) {
|
||||
Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@@ -206,6 +235,9 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
RequestBody price_body = RequestBody.create(plan_price, MediaType.parse("text/plain"));
|
||||
body.put("price", price_body);
|
||||
|
||||
RequestBody price_id_body = RequestBody.create(plan.stripe_price_id, MediaType.parse("text/plain"));
|
||||
body.put("price_id", price_id_body);
|
||||
|
||||
RequestBody subscription_xid_body = RequestBody.create(plan.id + "", MediaType.parse("text/plain"));
|
||||
body.put("subscription_xid", subscription_xid_body);
|
||||
|
||||
@@ -214,8 +246,6 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
String token = "Bearer " + AppUtil.getCgToken(this);
|
||||
|
||||
this.stripe_price_id = plan.stripe_price_id;
|
||||
|
||||
presenter.getPaymentCred(token, body, this);
|
||||
} catch (Exception e) {
|
||||
progressDialog.dismiss();
|
||||
@@ -256,7 +286,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
this.careGiverData = careGiverData1;
|
||||
|
||||
if (careGiverData1 == null){
|
||||
if (careGiverData1 == null) {
|
||||
binding.plansView.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
@@ -292,85 +322,144 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
Toast.makeText(this, "Payment failed.", Toast.LENGTH_SHORT).show();
|
||||
} else if (paymentSheetResult instanceof PaymentSheetResult.Completed) {
|
||||
// Display for example, an order confirmation screen
|
||||
Log.d(TAG, "Payment successful");
|
||||
Toast.makeText(this, "Payment successful.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// creating subscription
|
||||
createSubscription();
|
||||
Intent intent = new Intent(this, CgProfileProgressActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void createSubscription() {
|
||||
if (this.stripe_price_id == null || this.payment_intent_id == null) {
|
||||
// something went wrong
|
||||
Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
// private void createSubscription() {
|
||||
// if (this.stripe_price_id == null || this.payment_intent_id == null) {
|
||||
// // something went wrong
|
||||
// Toast.makeText(this, "Something went wrong", Toast.LENGTH_SHORT).show();
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// progressDialog.setTitle("Almost there...");
|
||||
// progressDialog.setMessage("We are verifying your payment.\nDon't leave the app screen.");
|
||||
// progressDialog.setCancelable(false);
|
||||
// progressDialog.show();
|
||||
//
|
||||
// Map<String, RequestBody> bodyMap = new HashMap<>();
|
||||
//
|
||||
// RequestBody pay_intent_id_body = RequestBody.create(this.payment_intent_id, MediaType.parse("text/plain"));
|
||||
// bodyMap.put("payment_intent_id", pay_intent_id_body);
|
||||
//
|
||||
// RequestBody price_id_body = RequestBody.create(this.stripe_price_id, MediaType.parse("text/plain"));
|
||||
// bodyMap.put("price_id", price_id_body);
|
||||
//
|
||||
// presenter.createSubscription(bodyMap,
|
||||
// "Bearer " + AppUtil.getCgToken(this),
|
||||
// this);
|
||||
//
|
||||
// }
|
||||
|
||||
progressDialog.setTitle("Almost there...");
|
||||
progressDialog.setMessage("We are verifying your payment.\nDon't leave the app screen.");
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
private void inflateCurrentPlan(CurrentPlan currentPlan) {
|
||||
binding.datesView.setVisibility(View.VISIBLE); // to show expiry and cancelled dates
|
||||
|
||||
Map<String, RequestBody> bodyMap = new HashMap<>();
|
||||
|
||||
RequestBody pay_intent_id_body = RequestBody.create(this.payment_intent_id, MediaType.parse("text/plain"));
|
||||
bodyMap.put("payment_intent_id", pay_intent_id_body);
|
||||
|
||||
RequestBody price_id_body = RequestBody.create(this.stripe_price_id, MediaType.parse("text/plain"));
|
||||
bodyMap.put("price_id", price_id_body);
|
||||
|
||||
presenter.createSubscription(bodyMap,
|
||||
"Bearer " + AppUtil.getCgToken(this),
|
||||
this);
|
||||
|
||||
}
|
||||
|
||||
private void inflateCurrentPlan(CurrentPlan currentPlan){
|
||||
binding.makePayment.setVisibility(View.VISIBLE);
|
||||
binding.makePayment.setText(R.string.cancel_subscription);
|
||||
|
||||
if ("2".equals(currentPlan.is_subscription_completed)){
|
||||
// subscription is cancelled
|
||||
binding.makePayment.setVisibility(View.GONE);
|
||||
|
||||
String cancelled_date = AppUtil.formatDate("yyyy-mm-dd", "mm-dd-yyyy", currentPlan.ended_at);
|
||||
if (cancelled_date != null){
|
||||
binding.cancelledDate.setText(cancelled_date);
|
||||
binding.cancelledDate.setVisibility(View.VISIBLE);
|
||||
|
||||
binding.cancelledDateText.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
binding.cancelledDateText.setVisibility(View.GONE);
|
||||
binding.cancelledDate.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
binding.yourPlan.setVisibility(View.VISIBLE);
|
||||
|
||||
SubscriptionPlan plan = currentPlan.plan;
|
||||
|
||||
if (getString(R.string.monthly).equals(plan.plan_name)){
|
||||
String per_duration = null;
|
||||
|
||||
// re-using per month card for showing current plan
|
||||
if (getString(R.string.monthly).equals(plan.plan_name)) {
|
||||
// monthly
|
||||
binding.monthlyName.setText(plan.plan_name);
|
||||
|
||||
binding.monthCheck.setSelected(true);
|
||||
|
||||
String price = "$" + plan.plan_value;
|
||||
String price = "$" + plan.plan_value;
|
||||
binding.monthlyPrice.setText(price);
|
||||
|
||||
per_duration = "/mo";
|
||||
|
||||
binding.monthCard.setVisibility(View.VISIBLE);
|
||||
binding.yearCard.setVisibility(View.GONE);
|
||||
|
||||
}else if (getString(R.string.year).equals(plan.plan_name)){
|
||||
} else if (getString(R.string.year).equals(plan.plan_name)) {
|
||||
// yearly
|
||||
binding.yearlyName.setText(plan.plan_name);
|
||||
|
||||
binding.yearCheck.setSelected(true);
|
||||
// code to show discounts and other values.
|
||||
// binding.yearlyName.setText(plan.plan_name);
|
||||
//
|
||||
// binding.yearCheck.setSelected(true);
|
||||
//
|
||||
// String price = "$" + plan.plan_value;
|
||||
// binding.yearDiscountedPrice.setText(price);
|
||||
//
|
||||
// binding.yearActualPrice.setVisibility(View.GONE);
|
||||
// binding.yearDiscount.setVisibility(View.GONE);
|
||||
//
|
||||
// try {
|
||||
// BigDecimal year_price_d = new BigDecimal(plan.plan_value);
|
||||
// String yearly_month_price = year_price_d.divide(new BigDecimal(12), RoundingMode.DOWN).toString();
|
||||
// yearly_month_price = "$" + yearly_month_price;
|
||||
// binding.yearlyMonthPrice.setText(yearly_month_price);
|
||||
// } catch (Exception e) {
|
||||
// binding.yearlyMonthPrice.setVisibility(View.GONE);
|
||||
// }
|
||||
|
||||
// code to only show name
|
||||
binding.monthlyName.setText(plan.plan_name);
|
||||
binding.monthCheck.setSelected(true);
|
||||
|
||||
String price = "$" + plan.plan_value;
|
||||
binding.yearDiscountedPrice.setText(price);
|
||||
binding.monthlyPrice.setText(price);
|
||||
|
||||
binding.yearActualPrice.setVisibility(View.GONE);
|
||||
binding.yearDiscount.setVisibility(View.GONE);
|
||||
per_duration = "/year";
|
||||
|
||||
try {
|
||||
BigDecimal year_price_d = new BigDecimal(plan.plan_value);
|
||||
String yearly_month_price = year_price_d.divide(new BigDecimal(12), RoundingMode.DOWN).toString();
|
||||
yearly_month_price = "$" + yearly_month_price;
|
||||
binding.yearlyMonthPrice.setText(yearly_month_price);
|
||||
}catch (Exception e){
|
||||
binding.yearlyMonthPrice.setVisibility(View.GONE);
|
||||
binding.monthCard.setVisibility(View.VISIBLE);
|
||||
binding.yearCard.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (per_duration != null) {
|
||||
binding.perMonthText.setText(per_duration);
|
||||
}else{
|
||||
binding.perMonthText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// next due date
|
||||
String next_due_date = AppUtil.formatDate("yyyy-mm-dd", "mm-dd-yyyy", currentPlan.current_period_end);
|
||||
if (next_due_date != null){
|
||||
binding.nextDueDate.setText(next_due_date);
|
||||
binding.nextDueDate.setVisibility(View.VISIBLE);
|
||||
|
||||
String next_due_text;
|
||||
if ("2".equals(currentPlan.is_subscription_completed)){
|
||||
// cancelled subscription
|
||||
next_due_text = "Your current plan will expire on";
|
||||
}else{
|
||||
next_due_text = "Next payment is due on";
|
||||
}
|
||||
|
||||
binding.monthCard.setVisibility(View.GONE);
|
||||
binding.yearCard.setVisibility(View.VISIBLE);
|
||||
binding.nextDueDateText.setText(next_due_text);
|
||||
binding.nextDueDateText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void inflatePlans() {
|
||||
@@ -382,7 +471,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
binding.yearCard.setVisibility(View.VISIBLE);
|
||||
binding.yearCard.setOnClickListener(v -> {
|
||||
if (!binding.yearCheck.isSelected()){
|
||||
if (!binding.yearCheck.isSelected()) {
|
||||
// not selected
|
||||
binding.monthCheck.setSelected(false);
|
||||
binding.yearCheck.setSelected(true);
|
||||
@@ -391,7 +480,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
binding.monthCard.setVisibility(View.VISIBLE);
|
||||
binding.monthCard.setOnClickListener(v -> {
|
||||
if (!binding.monthCheck.isActivated()){
|
||||
if (!binding.monthCheck.isActivated()) {
|
||||
binding.yearCheck.setSelected(false);
|
||||
binding.monthCheck.setSelected(true);
|
||||
}
|
||||
@@ -401,12 +490,12 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
String monthly_price = null;
|
||||
String yearly_price = null;
|
||||
|
||||
for (SubscriptionPlan plan: subscriptionPlans){
|
||||
if (getString(R.string.monthly).equals(plan.plan_name)){
|
||||
for (SubscriptionPlan plan : subscriptionPlans) {
|
||||
if (getString(R.string.monthly).equals(plan.plan_name)) {
|
||||
// monthly
|
||||
binding.monthlyName.setText(plan.plan_name);
|
||||
monthly_price = plan.plan_value;
|
||||
}else if (getString(R.string.year).equals(plan.plan_name)){
|
||||
} else if (getString(R.string.year).equals(plan.plan_name)) {
|
||||
// yearly
|
||||
binding.yearlyName.setText(plan.plan_name);
|
||||
yearly_price = plan.plan_value;
|
||||
@@ -425,7 +514,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
BigDecimal actual_year_price = month_price_d.multiply(TWELVE);
|
||||
|
||||
String strike_actual_year_price = "<strike>$" + actual_year_price + "</strike>";
|
||||
String strike_actual_year_price = "<strike>$" + actual_year_price + "</strike>";
|
||||
binding.yearActualPrice.setText(Html.fromHtml(strike_actual_year_price));
|
||||
|
||||
String yearly_month_price = year_price_d.divide(TWELVE, RoundingMode.DOWN).toString();
|
||||
@@ -441,7 +530,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
|
||||
binding.plansView.setVisibility(View.VISIBLE);
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
binding.plansView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -455,32 +544,21 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
return;
|
||||
}
|
||||
|
||||
this.payment_intent_id = credentials.payment_intent_id;
|
||||
|
||||
final PaymentSheet.CustomerConfiguration customerConfig = new PaymentSheet.CustomerConfiguration(
|
||||
credentials.customerId,
|
||||
credentials.ephemeralKey
|
||||
);
|
||||
|
||||
String paymentIntentClientSecret = credentials.paymentIntent;
|
||||
PaymentConfiguration.init(getApplicationContext(), credentials.stripe_publish_key);
|
||||
|
||||
// dismissing dialog now
|
||||
progressDialog.dismiss();
|
||||
|
||||
final PaymentSheet.Configuration configuration = new PaymentSheet.Configuration.Builder("SimpliTend")
|
||||
.customer(customerConfig)
|
||||
.billingDetailsCollectionConfiguration(new PaymentSheet.BillingDetailsCollectionConfiguration(
|
||||
PaymentSheet.BillingDetailsCollectionConfiguration.CollectionMode.Automatic,
|
||||
PaymentSheet.BillingDetailsCollectionConfiguration.CollectionMode.Automatic,
|
||||
PaymentSheet.BillingDetailsCollectionConfiguration.CollectionMode.Automatic,
|
||||
PaymentSheet.BillingDetailsCollectionConfiguration.AddressCollectionMode.Automatic,
|
||||
true
|
||||
))
|
||||
.allowsDelayedPaymentMethods(true)
|
||||
.build();
|
||||
|
||||
paymentSheet.presentWithPaymentIntent(
|
||||
paymentIntentClientSecret,
|
||||
credentials.clientSecret,
|
||||
configuration
|
||||
);
|
||||
|
||||
@@ -527,7 +605,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
progressDialog.dismiss();
|
||||
AppUtil.showAlert(this,
|
||||
getString(R.string.something_went_wrong),
|
||||
message ,
|
||||
message,
|
||||
"OK",
|
||||
((dialogInterface, i) -> {
|
||||
|
||||
@@ -538,6 +616,7 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
public void currentPlan(@NonNull CurrentPlan currentPlan) {
|
||||
progressDialog.dismiss();
|
||||
inflateCurrentPlan(currentPlan);
|
||||
this.current_subscription_plan_id = currentPlan.subscription_id;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -545,4 +624,18 @@ public class CgSubscriptionActivity extends AppCompatActivity
|
||||
progressDialog.dismiss();
|
||||
binding.plansView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subscriptionCancelled(@NonNull CurrentPlan currentPlan) {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(this, "Subscription cancelled.", Toast.LENGTH_SHORT).show();
|
||||
inflateCurrentPlan(currentPlan);
|
||||
this.current_subscription_plan_id = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subscriptionCancelFailed(Throwable t, String message) {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(this, "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Multipart;
|
||||
@@ -38,4 +39,8 @@ public interface SubscriptionApiService {
|
||||
Call<CallResponse<CurrentPlan>> getCurrentPlan(@Query("caregiver_id") long c_id,
|
||||
@Header("Authorization") String token);
|
||||
|
||||
@POST("api/cancel-subscription")
|
||||
Call<CallResponse<CurrentPlan>> cancelSubscription(@Body Map<String, String> body,
|
||||
@Header("Authorization") String token);
|
||||
|
||||
}
|
||||
|
||||
@@ -34,4 +34,9 @@ public interface SubscriptionContracts {
|
||||
void currentPlan(@NonNull CurrentPlan currentPlan);
|
||||
void failedCurrentPlan(Throwable t, String message);
|
||||
}
|
||||
|
||||
interface CancelSubscriptionCallback{
|
||||
void subscriptionCancelled(@NonNull CurrentPlan currentPlan);
|
||||
void subscriptionCancelFailed(Throwable t, String message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.app.simplitend.cg_subscription.mvp;
|
||||
|
||||
public class SubscriptionCredentials{
|
||||
public String customerId;
|
||||
public String paymentIntent;
|
||||
public String ephemeralKey;
|
||||
public String stripe_publish_key;
|
||||
|
||||
public String payment_intent_id;
|
||||
public String clientSecret;
|
||||
public String subscriptionId;
|
||||
|
||||
public SubscriptionCredentials(){}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.app.simplitend.cg_subscription.SubscriptionPlan;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
@@ -20,31 +21,31 @@ public class SubscriptionPresenter {
|
||||
|
||||
private final SubscriptionApiService apiService;
|
||||
|
||||
private SubscriptionPresenter(){
|
||||
private SubscriptionPresenter() {
|
||||
apiService = RetrofitHelper.getRetrofit().create(SubscriptionApiService.class);
|
||||
}
|
||||
|
||||
public static synchronized SubscriptionPresenter getPresenter(){
|
||||
if (presenter == null){
|
||||
public static synchronized SubscriptionPresenter getPresenter() {
|
||||
if (presenter == null) {
|
||||
presenter = new SubscriptionPresenter();
|
||||
}
|
||||
|
||||
return presenter;
|
||||
}
|
||||
|
||||
public void getSubscriptionPlans(@NonNull String token, @NonNull SubscriptionContracts.GetSubPlansCallback subPlansCallback){
|
||||
public void getSubscriptionPlans(@NonNull String token, @NonNull SubscriptionContracts.GetSubPlansCallback subPlansCallback) {
|
||||
apiService.getSubscriptionPlans(token)
|
||||
.enqueue(new Callback<CallResponse<ArrayList<SubscriptionPlan>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<ArrayList<SubscriptionPlan>>> call, Response<CallResponse<ArrayList<SubscriptionPlan>>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200 || response.body().result == null){
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200 || response.body().result == null) {
|
||||
subPlansCallback.onSubsFetchFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
subPlansCallback.onSubscriptionFetched(response.body().result);
|
||||
}else{
|
||||
} else {
|
||||
subPlansCallback.onSubsFetchFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
@@ -58,20 +59,20 @@ public class SubscriptionPresenter {
|
||||
|
||||
public void getPaymentCred(@NonNull String token,
|
||||
Map<String, RequestBody> body,
|
||||
@NonNull SubscriptionContracts.PaySubscriptionCallback paySubscriptionCallback){
|
||||
@NonNull SubscriptionContracts.PaySubscriptionCallback paySubscriptionCallback) {
|
||||
|
||||
apiService.paySubscription(token, body)
|
||||
.enqueue(new Callback<CallResponse<SubscriptionCredentials>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<SubscriptionCredentials>> call, Response<CallResponse<SubscriptionCredentials>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200 || response.body().result == null){
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200 || response.body().result == null) {
|
||||
paySubscriptionCallback.onPaymentCredFetchFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
paySubscriptionCallback.onPaymentCredFetched(response.body().result);
|
||||
}else{
|
||||
} else {
|
||||
paySubscriptionCallback.onPaymentCredFetchFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
@@ -86,19 +87,19 @@ public class SubscriptionPresenter {
|
||||
|
||||
public void createSubscription(Map<String, RequestBody> bodyMap,
|
||||
@NonNull String token,
|
||||
@NonNull SubscriptionContracts.CreateSubscriptionCallback createSubscriptionCallback){
|
||||
@NonNull SubscriptionContracts.CreateSubscriptionCallback createSubscriptionCallback) {
|
||||
apiService.createSubscription(token, bodyMap)
|
||||
.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){
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200) {
|
||||
createSubscriptionCallback.onSubscriptionCreateFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
createSubscriptionCallback.onSubscriptionCreated();
|
||||
}else{
|
||||
} else {
|
||||
createSubscriptionCallback.onSubscriptionCreateFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
@@ -112,19 +113,19 @@ public class SubscriptionPresenter {
|
||||
|
||||
public void getCurrentSubscriptionPlan(long c_id,
|
||||
@NonNull String token,
|
||||
@NonNull SubscriptionContracts.GetCurrentPlanCallback callback){
|
||||
@NonNull SubscriptionContracts.GetCurrentPlanCallback callback) {
|
||||
apiService.getCurrentPlan(c_id, token)
|
||||
.enqueue(new Callback<CallResponse<CurrentPlan>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<CurrentPlan>> call, Response<CallResponse<CurrentPlan>> response) {
|
||||
if (response.body() != null){
|
||||
if (response.body().status != 200 || response.body().error_code == 1 || response.body().result == null){
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200 || response.body().error_code == 1 || response.body().result == null) {
|
||||
callback.failedCurrentPlan(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
callback.currentPlan(response.body().result);
|
||||
}else{
|
||||
} else {
|
||||
callback.failedCurrentPlan(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
@@ -136,4 +137,35 @@ public class SubscriptionPresenter {
|
||||
});
|
||||
}
|
||||
|
||||
public void cancelSubscription(@NonNull String subscriptionId,
|
||||
String token,
|
||||
@NonNull SubscriptionContracts.CancelSubscriptionCallback callback) {
|
||||
|
||||
Map<String, String> body = new HashMap<>();
|
||||
body.put("subscription_id", subscriptionId);
|
||||
|
||||
apiService.cancelSubscription(body,
|
||||
"Bearer " + token).enqueue(new Callback<CallResponse<CurrentPlan>>() {
|
||||
@Override
|
||||
public void onResponse(Call<CallResponse<CurrentPlan>> call, Response<CallResponse<CurrentPlan>> response) {
|
||||
if (response.body() != null) {
|
||||
if (response.body().status != 200 || response.body().error_code == 1 || response.body().result == null) {
|
||||
callback.subscriptionCancelFailed(new Exception(), response.body().message);
|
||||
return;
|
||||
}
|
||||
|
||||
callback.subscriptionCancelled(response.body().result);
|
||||
} else {
|
||||
callback.subscriptionCancelFailed(new Exception(), "Please try again later.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<CallResponse<CurrentPlan>> call, Throwable t) {
|
||||
callback.subscriptionCancelFailed(new Exception(), t.getLocalizedMessage());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
|
||||
});
|
||||
|
||||
binding.dosageDrop.setOnClickListener(v -> {
|
||||
binding.doseShortName.setOnClickListener(v -> {
|
||||
AppUtil.closeKeyboard(requireActivity());
|
||||
binding.dosageSpinner.show();
|
||||
});
|
||||
@@ -306,6 +306,17 @@ public class AddReminderFragment extends Fragment implements CompoundButton.OnCh
|
||||
binding.medicationsSpinner.setError(null);
|
||||
});
|
||||
|
||||
binding.dosageSpinner.setOnSpinnerItemSelectedListener((OnSpinnerItemSelectedListener<String>) (i, s, i1, t1) -> {
|
||||
String short_name;
|
||||
try {
|
||||
short_name = String.valueOf(dosageTypeList.get(binding.dosageSpinner.getSelectedIndex()).value);
|
||||
} catch (Exception e) {
|
||||
short_name = "Other";
|
||||
}
|
||||
|
||||
binding.doseShortName.setText(short_name);
|
||||
});
|
||||
|
||||
// load into spinner
|
||||
loadFreqNMedType();
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ import com.app.simplitend.databinding.ConnectCaregiverFragmentBinding;
|
||||
import com.app.simplitend.welcome.welcomecg.WelcomeContracts;
|
||||
import com.app.simplitend.welcome.welcomecg.mvvm.CgWelcomeViewModel;
|
||||
import com.app.simplitend.welcome.welcomecg.mvvm.ConnectCgResult;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.load.resource.gif.GifDrawable;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -88,6 +93,14 @@ public class CgConnectFragment extends Fragment implements
|
||||
|
||||
viewModel.resendCgCode(body, token, this);
|
||||
});
|
||||
|
||||
binding.proceed.setOnClickListener(v -> {
|
||||
// go to cg dash board
|
||||
Intent intent = new Intent(requireActivity(), CgAuthActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
});
|
||||
}
|
||||
|
||||
private void connectCG() {
|
||||
@@ -164,14 +177,25 @@ public class CgConnectFragment extends Fragment implements
|
||||
public void onCgConnected(ConnectCgResult result) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
Toast.makeText(requireContext(), "Caregiver connected.", Toast.LENGTH_SHORT).show();
|
||||
binding.connectView.setVisibility(View.GONE);
|
||||
binding.connectCompleteView.setVisibility(View.VISIBLE);
|
||||
|
||||
// go to cg dash board
|
||||
Intent intent = new Intent(requireActivity(), CgAuthActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
requireActivity().finish();
|
||||
Glide.with(this)
|
||||
.asGif()
|
||||
.load(R.raw.done_anim_primary)
|
||||
.listener(new RequestListener<GifDrawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(GifDrawable resource, Object model, Target<GifDrawable> target, DataSource dataSource, boolean isFirstResource) {
|
||||
resource.setLoopCount(1);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.into(binding.animIv);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
7
app/src/main/res/drawable/gray_border.xml
Normal file
7
app/src/main/res/drawable/gray_border.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<stroke android:color="@android:color/darker_gray"
|
||||
android:width="0.5dp"/>
|
||||
|
||||
</shape>
|
||||
20
app/src/main/res/drawable/ic_cvc.xml
Normal file
20
app/src/main/res/drawable/ic_cvc.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="26dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="26"
|
||||
android:viewportHeight="17">
|
||||
<path
|
||||
android:pathData="M17.9421,1H1.6552C0.8938,1 0,1.8926 0,2.6842V15.3158C0,16.1074 0.8938,17 1.6552,17H22.3448C23.1062,17 24,16.1074 24,15.3158V8.9747C23.3028,9.6129 22.4418,10.0363 21.5172,10.1958V10.2632C21.5172,10.8189 21.2193,11.1053 20.6897,11.1053H2.4828C1.9531,11.1053 1.6552,10.8189 1.6552,10.2632V9.4211C1.6552,8.8653 1.9531,8.5789 2.4828,8.5789H16.9903C16.5126,8.0402 16.1549,7.4028 15.9418,6.7104C15.7287,6.0179 15.6651,5.2868 15.7555,4.567C15.8459,3.8473 16.0881,3.1559 16.4655,2.5402C16.8429,1.9246 17.3466,1.3992 17.9421,1V1Z"
|
||||
android:fillColor="#000000"
|
||||
android:fillAlpha="0.14"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M15.7137,4.0476H0V6.4762H15.5025C15.366,5.6619 15.4387,4.8264 15.7137,4.0476Z"
|
||||
android:fillColor="#000000"
|
||||
android:fillAlpha="0.34"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M20.3125,11.3333C18.8041,11.3333 17.3574,10.7363 16.2908,9.6736C15.2242,8.6109 14.625,7.1696 14.625,5.6667C14.625,4.1638 15.2242,2.7224 16.2908,1.6597C17.3574,0.597 18.8041,0 20.3125,0C21.8209,0 23.2676,0.597 24.3342,1.6597C25.4008,2.7224 26,4.1638 26,5.6667C26,7.1696 25.4008,8.6109 24.3342,9.6736C23.2676,10.7363 21.8209,11.3333 20.3125,11.3333ZM18.0538,3.3191H17.4119L15.8438,4.1124V4.9219L17.0869,4.2743V8.0143H18.0619V3.3191H18.0538ZM19.9225,3.9667C20.3856,3.9667 20.7106,4.2257 20.7106,4.5981C20.7106,5.0029 20.3288,5.2862 19.7763,5.2862H19.5325V5.9743H19.825C20.41,5.9743 20.8081,6.2657 20.8081,6.6867C20.8081,7.0914 20.4181,7.3667 19.8656,7.3667C19.4594,7.3667 19.0531,7.2371 18.6306,6.9862V7.7957C19.0856,7.99 19.5406,8.0952 19.9875,8.0952C21.0519,8.0952 21.7831,7.5529 21.7831,6.7676C21.7831,6.2171 21.4419,5.7719 20.8731,5.5938C21.3606,5.4319 21.6775,5.0029 21.6775,4.5171C21.6775,3.7562 21.0031,3.2381 20.0281,3.2381C19.5886,3.2429 19.1547,3.3366 18.7525,3.5133V4.3067C19.1425,4.0881 19.5406,3.9667 19.9225,3.9667ZM23.4325,5.7314C24.0256,5.7314 24.44,6.0795 24.44,6.5329C24.44,7.0105 24.0256,7.3424 23.4325,7.3424C23.075,7.3424 22.7013,7.2291 22.3194,6.9943V7.8281C22.7175,8.0062 23.1238,8.0952 23.5219,8.0952C23.7331,8.0952 23.9281,8.0629 24.115,8.0143C24.5375,7.3262 24.7813,6.5329 24.7813,5.6829L24.765,5.3429C24.4629,5.1647 24.1166,5.0749 23.7656,5.0838C23.6194,5.0838 23.465,5.0919 23.3025,5.1162V4.0638H24.4725C24.371,3.8047 24.2459,3.5554 24.0988,3.3191H22.4575V5.8691C22.7825,5.7881 23.1075,5.7314 23.4325,5.7314Z"
|
||||
android:fillColor="#656565"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_locked_filled.xml
Normal file
10
app/src/main/res/drawable/ic_locked_filled.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="18dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="18"
|
||||
android:viewportHeight="18">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z" />
|
||||
</vector>
|
||||
@@ -7,8 +7,92 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/pay_success_complete_view"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white_bg"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/link_btn"
|
||||
|
||||
app:cardElevation="3dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
|
||||
android:layout_margin="15dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_250sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="@dimen/_15sdp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:contentDescription="@string/thank_you" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/your_payment_was_successfully_processed"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:text="@string/you_can_now_link_to_your_loved_one_s_smartphone_and_receive_notifications"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/_16ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/link_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/link_to_senior_phone"
|
||||
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="25dp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/loading_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
android:background="@drawable/edit_text_bg_4"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone">
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white_bg"
|
||||
android:overScrollMode="never">
|
||||
|
||||
@@ -43,61 +43,59 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/medicine_name"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="35sp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/medicine_name"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/medic_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:autofillHints="name"
|
||||
|
||||
android:hint="@string/enter_your_medicine_name"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:drawableStart="@drawable/ic_medicine"
|
||||
android:drawablePadding="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/enter_your_medicine_name"
|
||||
|
||||
android:autofillHints="name"
|
||||
android:inputType="textCapWords"
|
||||
android:padding="10dp"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dosage"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/dosage"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:orientation="vertical"
|
||||
|
||||
>
|
||||
|
||||
@@ -105,9 +103,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
|
||||
|
||||
android:weightSum="10"
|
||||
|
||||
>
|
||||
@@ -116,137 +111,138 @@
|
||||
android:id="@+id/dosage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="8"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
|
||||
android:hint="@string/enter_dosage"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#A1A1A1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawableStart="@drawable/ic_dosage"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:maxLength="6"
|
||||
android:layout_weight="7.5"
|
||||
|
||||
android:autofillHints="@null"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableStart="@drawable/ic_dosage"
|
||||
android:drawablePadding="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/enter_dosage"
|
||||
|
||||
android:inputType="numberDecimal"
|
||||
/>
|
||||
android:maxLength="6"
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:layout_width="1dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
<!-- android:background="@android:color/darker_gray"/>-->
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dosage_drop"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#A1A1A1" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/dosage_drop"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="2">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="15dp"-->
|
||||
<!-- android:layout_height="25dp"-->
|
||||
<!-- android:src="@drawable/ic_down"-->
|
||||
<!-- android:layout_centerInParent="true"-->
|
||||
<!-- app:tint="@color/black" />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dose_short_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
android:layout_weight="2.5"
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/ic_down"
|
||||
android:layout_centerInParent="true"
|
||||
app:tint="@color/black" />
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:gravity="center"
|
||||
android:text="@string/mg"
|
||||
tools:text="gm"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="2"-->
|
||||
|
||||
<!-- android:text="@string/mg"-->
|
||||
<!-- android:fontFamily="@font/nunito_regular"-->
|
||||
<!-- android:textAlignment="center"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:textColor="@android:color/darker_gray"-->
|
||||
<!-- android:textAppearance="@style/TextAppearance.Material3.TitleMedium"-->
|
||||
|
||||
<!-- />-->
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingStart="0dp"
|
||||
app:drawableEndCompat="@drawable/ic_down"
|
||||
app:drawableTint="@color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
android:id="@+id/dosage_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
|
||||
tools:text="Tablespoon"
|
||||
android:textColorHint="#A1A1A1"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:spinner_arrow_show="false"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
app:spinner_popup_start_padding="15dp"
|
||||
app:spinner_popup_end_padding="15dp"
|
||||
|
||||
app:spinner_arrow_animate="true"
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:spinner_arrow_gravity="end"
|
||||
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_show="false"
|
||||
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_color="@color/black"
|
||||
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
/>
|
||||
app:spinner_popup_end_padding="15dp"
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_popup_start_padding="15dp"
|
||||
tools:text="Tablespoon" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/medication_type"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/medication_type"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_med_type"
|
||||
|
||||
android:layout_margin="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
@@ -254,37 +250,36 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_medication_type"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/enter_medication_type"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textColorHint="#A1A1A1"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
app:spinner_arrow_animate="true"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:spinner_arrow_gravity="end"
|
||||
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
|
||||
|
||||
/>
|
||||
@@ -294,34 +289,33 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/frequency"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/frequency"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
|
||||
android:contentDescription="@string/medication_type"
|
||||
|
||||
app:srcCompat="@drawable/ic_freq"
|
||||
|
||||
android:layout_margin="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<com.skydoves.powerspinner.PowerSpinnerView
|
||||
@@ -329,82 +323,78 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:hint="@string/enter_frequency"
|
||||
android:textColorHint="#A1A1A1"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
|
||||
app:spinner_popup_max_height="200dp"
|
||||
app:spinner_arrow_animate="true"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
|
||||
android:background="@color/white_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/enter_frequency"
|
||||
|
||||
android:padding="10dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textColorHint="#A1A1A1"
|
||||
app:fontFamily="@font/nunito_regular"
|
||||
app:spinner_arrow_animate="true"
|
||||
|
||||
app:spinner_arrow_drawable="@drawable/ic_down"
|
||||
app:spinner_arrow_gravity="end"
|
||||
|
||||
app:spinner_arrow_padding="8dp"
|
||||
app:spinner_arrow_tint="@color/black"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_divider_show="true"
|
||||
app:spinner_divider_size="0.4dp"
|
||||
app:spinner_divider_color="@color/black"
|
||||
app:spinner_item_height="46dp"
|
||||
app:spinner_popup_animation="dropdown"
|
||||
app:spinner_popup_background="@drawable/edit_text_bg_2"
|
||||
app:spinner_popup_elevation="14dp"
|
||||
/>
|
||||
app:spinner_popup_max_height="200dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_reminder"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/set_reminder"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:weightSum="10"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="10">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="7"
|
||||
android:text="@string/everyday"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/everyday"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"/>
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/everyday_check"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:switchMinWidth="60dp"
|
||||
app:track="@drawable/switch_track_1"
|
||||
app:thumbTint="@color/color_primary"
|
||||
android:layout_weight="3"
|
||||
app:showText="false"
|
||||
/>
|
||||
app:switchMinWidth="60dp"
|
||||
app:thumbTint="@color/color_primary"
|
||||
app:track="@drawable/switch_track_1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -412,16 +402,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginVertical="5dp"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:paddingVertical="5dp"
|
||||
|
||||
android:baselineAligned="false"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:weightSum="7">
|
||||
|
||||
<RelativeLayout
|
||||
@@ -581,116 +571,115 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_time"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:hint="@string/enter_time"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
android:visibility="gone"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_clock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_time_2"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:hint="@string/enter_time_2"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
android:visibility="gone"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_clock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_time_3"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:layout_marginVertical="10dp"
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:hint="@string/enter_time_3"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
android:visibility="gone"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_clock" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/quantity"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/quantity"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/quantity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:autofillHints="@null"
|
||||
|
||||
android:hint="@string/enter_quantity"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:drawableStart="@drawable/ic_quantity"
|
||||
android:drawablePadding="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/enter_quantity"
|
||||
|
||||
android:inputType="number"
|
||||
android:maxLength="3"
|
||||
|
||||
android:autofillHints="@null"
|
||||
android:inputType="number"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
@@ -714,12 +703,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/optional"
|
||||
android:layout_marginStart="5dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:text="@string/optional"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
|
||||
|
||||
android:layout_marginStart="5dp"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
@@ -729,40 +718,39 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
>
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/get_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
|
||||
android:hint="@string/enter_refill_date"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:drawablePadding="10dp"
|
||||
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/enter_refill_date"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
app:drawableStartCompat="@drawable/ic_calender_2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/remove_date_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_close_outline"
|
||||
android:contentDescription="@string/close"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_close_outline"
|
||||
app:tint="@android:color/darker_gray" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -770,46 +758,45 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/instruction"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:textColor="@color/black"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
/>
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:text="@string/instruction"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/instructions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:autofillHints="@null"
|
||||
|
||||
android:hint="@string/enter_instructions"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
|
||||
android:paddingVertical="15dp"
|
||||
android:padding="10dp"
|
||||
|
||||
android:background="@drawable/edit_text_bg_2"
|
||||
android:drawableStart="@drawable/ic_instruction"
|
||||
android:drawablePadding="10dp"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:hint="@string/enter_instructions"
|
||||
|
||||
android:autofillHints="@null"
|
||||
android:inputType="textCapSentences"
|
||||
|
||||
android:maxHeight="150dp"
|
||||
android:maxLength="60"
|
||||
|
||||
android:maxLength="60"
|
||||
android:overScrollMode="always"
|
||||
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:scrollbarStyle="insideInset"
|
||||
android:scrollbars="vertical"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@@ -818,15 +805,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="35dp"
|
||||
android:text="@string/add_reminder"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white_bg"
|
||||
android:paddingVertical="15dp"
|
||||
android:text="@string/add_reminder"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/white_bg"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="15dp"
|
||||
/>
|
||||
app:cornerRadius="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/year_card"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/month_card"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -285,6 +285,7 @@
|
||||
android:layout_marginVertical="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
@@ -319,7 +320,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
@@ -337,6 +337,7 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/per_month_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -351,6 +352,64 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dates_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/ll"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="10dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancelled_date_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
|
||||
android:text="@string/you_cancelled_your_subscription_on"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancelled_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
|
||||
tools:text="12-22-2001"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/next_due_date_text"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="@string/you_cancelled_your_subscription"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/next_due_date"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
tools:text="12-22-2001"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -5,158 +5,241 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<ScrollView
|
||||
<RelativeLayout
|
||||
android:id="@+id/connect_view"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/ll">
|
||||
>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/ll">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_130sdp"
|
||||
android:layout_height="@dimen/_130sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/_50sdp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:contentDescription="@string/forget_pin" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
|
||||
android:text="@string/accept_your_loved_one_s_invitation_to_connect"
|
||||
|
||||
android:textAlignment="center"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
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:layout_marginHorizontal="15sp"
|
||||
android:autofillHints="emailAddress"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:drawableStart="@drawable/ic_email_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
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:layout_marginHorizontal="15dp"
|
||||
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" />
|
||||
|
||||
<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"
|
||||
|
||||
android:maxLength="4"
|
||||
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="15sp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/_130sdp"
|
||||
android:layout_height="@dimen/_130sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/_50sdp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:contentDescription="@string/forget_pin" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
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:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/white_bg"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:cornerRadius="25dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resend_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:padding="5dp"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="25dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:fontFamily="@font/nunito_semibold"
|
||||
|
||||
android:text="@string/accept_your_loved_one_s_invitation_to_connect"
|
||||
|
||||
android:textAlignment="center"
|
||||
|
||||
android:text="@string/didn_t_receive_code_resend"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_22ssp"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
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:layout_marginHorizontal="15sp"
|
||||
android:autofillHints="emailAddress"
|
||||
android:background="@drawable/edit_text_bg_3"
|
||||
|
||||
android:drawableStart="@drawable/ic_email_outline"
|
||||
android:drawablePadding="20dp"
|
||||
|
||||
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:layout_marginHorizontal="15dp"
|
||||
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" />
|
||||
|
||||
<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"
|
||||
|
||||
android:maxLength="4"
|
||||
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="15sp"
|
||||
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#5B5B5B" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
<RelativeLayout
|
||||
android:id="@+id/connect_complete_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white_bg"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/proceed"
|
||||
|
||||
app:cardElevation="3dp"
|
||||
app:cardCornerRadius="15dp"
|
||||
|
||||
android:layout_margin="15dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_250sdp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="@dimen/_15sdp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:contentDescription="@string/thank_you" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:text="@string/thank_you_for_creating_account_with_simplitend"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/_18ssp"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/connect_btn"
|
||||
android:id="@+id/proceed"
|
||||
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:layout_marginVertical="15dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/proceed_with_subscription"
|
||||
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="25dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resend_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:fontFamily="@font/nunito_medium"
|
||||
android:padding="5dp"
|
||||
|
||||
android:text="@string/didn_t_receive_code_resend"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_14ssp"
|
||||
app:cornerRadius="25dp"
|
||||
|
||||
android:drawableEnd="@drawable/ic_forward_error"
|
||||
android:drawablePadding="15dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -232,7 +232,7 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/calls"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
@@ -281,7 +281,7 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/chats"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
|
||||
app:strokeColor="@color/color_accent"
|
||||
@@ -321,6 +321,10 @@
|
||||
android:textSize="@dimen/_14ssp"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textAlignment="center"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
|
||||
|
||||
148
app/src/main/res/layout/payment_bs.xml
Normal file
148
app/src/main/res/layout/payment_bs.xml
Normal file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:background="#2f2f2f"
|
||||
android:padding="20dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="5dp"
|
||||
app:strokeColor="@android:color/darker_gray"
|
||||
app:strokeWidth="0.5dp"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:cardBackgroundColor="#444444"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/gray_border"
|
||||
>
|
||||
|
||||
<com.stripe.android.view.CardNumberEditText
|
||||
android:id="@+id/card_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:hint="@string/card_number"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_toStartOf="@id/card_brand"
|
||||
/>
|
||||
|
||||
<com.stripe.android.view.CardBrandView
|
||||
android:id="@+id/card_brand"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.stripe.android.view.ExpiryDateEditText
|
||||
android:id="@+id/expiry_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:background="@drawable/gray_border"
|
||||
android:padding="15dp"
|
||||
|
||||
android:hint="@string/mm_yy"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
|
||||
|
||||
android:nextFocusRight="@id/cvv"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/gray_border"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.stripe.android.view.CvcEditText
|
||||
android:id="@+id/cvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="15dp"
|
||||
|
||||
android:hint="@string/mm_yy"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:fontFamily="@font/nunito_regular"
|
||||
android:textColor="@color/white"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
|
||||
|
||||
android:layout_toStartOf="@id/cvc_icon"
|
||||
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cvc_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_cvc"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="5dp"
|
||||
app:tint="@android:color/darker_gray" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/payButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="@color/color_primary"
|
||||
android:enabled="false"
|
||||
android:text="@string/subscribe"
|
||||
tools:text="Pay $53.5"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/nunito_bold"
|
||||
android:textColor="@color/white"
|
||||
android:paddingVertical="10dp"
|
||||
android:drawableEnd="@drawable/ic_locked_filled"
|
||||
app:cornerRadius="5dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -445,5 +445,15 @@
|
||||
<string name="open_simplitend">open simplitend</string>
|
||||
<string name="no_chats_found_start_chatting">No chats found. Start chatting!</string>
|
||||
<string name="setup_a_4_digit_pin">Setup a 4-digit pin</string>
|
||||
<string name="card_number">Card number</string>
|
||||
<string name="mm_yy">MM / YY</string>
|
||||
<string name="next_payment_is_due_on">Next payment is due on</string>
|
||||
<string name="thank_you_for_creating_account_with_simplitend">Thank you for creating account with SimpliTend</string>
|
||||
<string name="proceed_with_subscription">Proceed with subscription</string>
|
||||
<string name="you_cancelled_your_subscription">You cancelled your subscription,</string>
|
||||
<string name="you_cancelled_your_subscription_on">You cancelled your subscription on</string>
|
||||
<string name="your_payment_was_successfully_processed">Your payment was successfully processed</string>
|
||||
<string name="you_can_now_link_to_your_loved_one_s_smartphone_and_receive_notifications">You can now link to your loved one\'s smartphone and receive notifications</string>
|
||||
<string name="link_to_senior_phone">Link to senior phone</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user