Browse Source

MoneyGram Related UI changes

master
Preyea Regmi 4 years ago
parent
commit
5ea220d50f
  1. 134
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/model/SendMoneyTransactionCompleteModel.java
  2. 13
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyTransactionCompleteV2Presenter.java
  3. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyTransactionCompleteV2PresenterInterface.java
  4. 5
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2Presenter.java
  5. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2PresenterInterface.java
  6. 57
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/view/SendMoneyV2TransactionCompleteActivity.java
  7. 17
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/view/verification/VerificationSendMoneyFragment.java
  8. 41
      app/src/main/res/layout/activity_send_money_v2_transaction_complete.xml
  9. 18
      app/src/main/res/layout/fragment_verification_send_money_v2.xml
  10. 4
      app/src/main/res/values/strings.xml

134
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/model/SendMoneyTransactionCompleteModel.java

@ -6,6 +6,7 @@ import com.google.gson.annotations.SerializedName;
public class SendMoneyTransactionCompleteModel {
@SerializedName("controlNo")
@Expose
private String controlNo;
@ -90,7 +91,18 @@ public class SendMoneyTransactionCompleteModel {
@SerializedName("discountPercent")
@Expose
private String discountPercent;
@SerializedName("logoUrl")
@Expose
private String logoUrl;
@SerializedName("logoText")
@Expose
private String logoText;
@SerializedName("showPartnerLogo")
@Expose
private String showPartnerLogo;
@SerializedName("note")
@Expose
private String note;
public String getControlNo() {
return controlNo;
}
@ -328,4 +340,124 @@ public class SendMoneyTransactionCompleteModel {
public void setDiscountPercent(String discountPercent) {
this.discountPercent = discountPercent;
}
public String getrFirstName() {
return rFirstName;
}
public void setrFirstName(String rFirstName) {
this.rFirstName = rFirstName;
}
public String getrMiddleName() {
return rMiddleName;
}
public void setrMiddleName(String rMiddleName) {
this.rMiddleName = rMiddleName;
}
public String getrLastName() {
return rLastName;
}
public void setrLastName(String rLastName) {
this.rLastName = rLastName;
}
public String getrAddress() {
return rAddress;
}
public void setrAddress(String rAddress) {
this.rAddress = rAddress;
}
public String getrCountryName() {
return rCountryName;
}
public void setrCountryName(String rCountryName) {
this.rCountryName = rCountryName;
}
public String getrContactNo() {
return rContactNo;
}
public void setrContactNo(String rContactNo) {
this.rContactNo = rContactNo;
}
public String getrCity() {
return rCity;
}
public void setrCity(String rCity) {
this.rCity = rCity;
}
public String getrEmail() {
return rEmail;
}
public void setrEmail(String rEmail) {
this.rEmail = rEmail;
}
public String getrState() {
return rState;
}
public void setrState(String rState) {
this.rState = rState;
}
public String getpAmount() {
return pAmount;
}
public void setpAmount(String pAmount) {
this.pAmount = pAmount;
}
public String getpAgentBank() {
return pAgentBank;
}
public void setpAgentBank(String pAgentBank) {
this.pAgentBank = pAgentBank;
}
public String getLogoUrl() {
return logoUrl;
}
public void setLogoUrl(String logoUrl) {
this.logoUrl = logoUrl;
}
public String getLogoText() {
return logoText;
}
public void setLogoText(String logoText) {
this.logoText = logoText;
}
public String getShowPartnerLogo() {
return showPartnerLogo;
}
public void setShowPartnerLogo(String showPartnerLogo) {
this.showPartnerLogo = showPartnerLogo;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
}

13
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyTransactionCompleteV2Presenter.java

@ -3,6 +3,7 @@ package com.gmeremit.online.gmeremittance_native.sendmoneyV2.presenter;
import com.gmeremit.online.gmeremittance_native.base.BasePresenter;
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.gateway.SendMoneyTransactionCompleteV2Gateway;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionCompleteModel;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionCompleteV2ResponseBody;
import com.gmeremit.online.gmeremittance_native.utils.Constants;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse;
@ -49,9 +50,19 @@ public class SendMoneyTransactionCompleteV2Presenter extends BasePresenter imple
@Override
protected void onSuccess(SendMoneyTransactionCompleteV2ResponseBody sendMoneyTransactionCompleteV2ResponseBody) {
SendMoneyTransactionCompleteModel data = sendMoneyTransactionCompleteV2ResponseBody.getData();
if(sendMoneyTransactionCompleteV2ResponseBody.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2))
{
view.showReceiptData(sendMoneyTransactionCompleteV2ResponseBody.getData());
view.showReceiptData(data);
if("Y".equalsIgnoreCase(data.getShowPartnerLogo()))
{
view.showPartnerInfo(true,data.getLogoText(),data.getLogoUrl());
}
else
{
view.showPartnerInfo(false,"","");
}
}
else
{

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyTransactionCompleteV2PresenterInterface.java

@ -15,5 +15,7 @@ public interface SendMoneyTransactionCompleteV2PresenterInterface extends BasePr
void showReceiptData(SendMoneyTransactionCompleteModel recieptData);
void showPartnerInfo(boolean action,String partnerText,String partnerLogoUrl);
}
}

5
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2Presenter.java

@ -261,6 +261,11 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
return Utils.removeSpecialCharacterAndDecimalFromCurrency(selectedSendingAmount);
}
@Override
public WebRequestModel getWebRequestDataForFraudWarning() {
return new WebRequestModel("", "https://online.gmeremit.com/Terms#Fraud", null);
}
private void performSendMoneyTransaction(String password, boolean isBiometricUsed) {

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2PresenterInterface.java

@ -56,6 +56,8 @@ public interface SendMoneyV2PresenterInterface extends BasePresenterInterface {
String getTransactionAmount();
WebRequestModel getWebRequestDataForFraudWarning();
interface SendMoneyV2ContractInterface extends BaseContractInterface
{

57
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/view/SendMoneyV2TransactionCompleteActivity.java

@ -1,12 +1,22 @@
package com.gmeremit.online.gmeremittance_native.sendmoneyV2.view;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BaseActivity;
import com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView;
@ -16,6 +26,8 @@ import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTrans
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.presenter.SendMoneyTransactionCompleteV2Presenter;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.presenter.SendMoneyTransactionCompleteV2PresenterInterface;
import com.gmeremit.online.gmeremittance_native.supportV2.view.SupportActivityV2;
import com.zoyi.com.bumptech.glide.request.animation.GlideAnimation;
import com.zoyi.com.bumptech.glide.request.target.SimpleTarget;
import butterknife.BindView;
import butterknife.ButterKnife;
@ -91,6 +103,17 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
@BindView(R.id.tv_coupon)
TextView tv_coupon;
@BindView(R.id.container_partner_info)
ViewGroup container_partner_info;
@BindView(R.id.txt_partner_info)
TextView txt_partner_info;
@BindView(R.id.img_partner_info)
ImageView img_partner_info;
@BindView(R.id.progressbar_partner_info)
View progressbar_partner_info;
public static String SEND_MONEY_TID_BUNDLE_KEY = "sendMoneyTransactionId";
public static final String SEND_MONEY_CONTROL_NO_BUNDLE_KEY = "bundleControlId";
@ -211,6 +234,40 @@ public class SendMoneyV2TransactionCompleteActivity extends BaseActivity impleme
}
@Override
public void showPartnerInfo(boolean action, String partnerText, String partnerLogoUrl) {
if(true)
{
img_partner_info.setImageResource(0);
txt_partner_info.setText(partnerText);
progressbar_partner_info.setVisibility(View.VISIBLE);
container_partner_info.setVisibility(View.VISIBLE);
Glide.with(img_partner_info.getContext()).asBitmap().load(partnerLogoUrl) .listener(new RequestListener<Bitmap>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Bitmap> target, boolean isFirstResource) {
progressbar_partner_info.setVisibility(View.GONE);
img_partner_info.setVisibility(View.GONE);
return false;
}
@Override
public boolean onResourceReady(Bitmap resource, Object model, Target<Bitmap> target, DataSource dataSource, boolean isFirstResource) {
progressbar_partner_info.setVisibility(View.GONE);
img_partner_info.setVisibility(View.VISIBLE);
return false;
}
}).into(img_partner_info);
}
else
{
container_partner_info.setVisibility(View.GONE);
progressbar_partner_info.setVisibility(View.GONE);
img_partner_info.setImageResource(0);
txt_partner_info.setText("");
}
}
@Override
public void onClick(View v) {

17
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/view/verification/VerificationSendMoneyFragment.java

@ -57,6 +57,8 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
@BindView(R.id.txt_user_aggreement)
TextView txt_user_aggreement;
@BindView(R.id.txt_fraud_warning)
TextView txt_fraud_warning;
@BindView(R.id.exRateCalculateButton)
Button sendTransactionButton;
@ -109,6 +111,7 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
super.onStart();
sendTransactionButton.setOnClickListener(this);
txt_user_aggreement.setOnClickListener(this);
txt_fraud_warning.setOnClickListener(this);
}
@Override
@ -116,6 +119,7 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
super.onStop();
sendTransactionButton.setOnClickListener(null);
txt_user_aggreement.setOnClickListener(null);
txt_fraud_warning.setOnClickListener(null);
}
@ -178,14 +182,19 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
case R.id.txt_user_aggreement:
openUserAgreement();
break;
case R.id.txt_fraud_warning:
openFraudWarning();
}
}
private void openFraudWarning() {
WebRequestModel requestModel=((SendMoneyActionListener)getActivity()).getPresenter().getWebRequestDataForFraudWarning();
Intent intent= new Intent(getActivity(),TermsAndConditionV2BrowserActivity.class);
intent.putExtra(WEB_BROWSWER_URL_BUNDLE_KEY,requestModel);
startActivity(intent);
}
private void openUserAgreement() {
// String url = "https://online.gmeremit.com/Terms";
// Intent i = new Intent(Intent.ACTION_VIEW);
// i.setData(Uri.parse(url));
// launchActivity(i);
WebRequestModel requestModel=((SendMoneyActionListener)getActivity()).getPresenter().getWebRequestDataForTermsAndCondition();
Intent intent= new Intent(getActivity(),TermsAndConditionV2BrowserActivity.class);
intent.putExtra(WEB_BROWSWER_URL_BUNDLE_KEY,requestModel);

41
app/src/main/res/layout/activity_send_money_v2_transaction_complete.xml

@ -550,6 +550,47 @@
</RelativeLayout>
</RelativeLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/container_partner_info"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="wrap_content"
android:paddingTop="@dimen/_8sdp"
android:paddingBottom="@dimen/_8sdp">
<ImageView
android:visibility="gone"
android:id="@+id/img_partner_info"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/txt_partner_info"
android:layout_width="0dp"
app:layout_constraintDimensionRatio="H,3:1"
android:layout_height="0dp"/>
<ProgressBar
android:id="@+id/progressbar_partner_info"
android:layout_width="@dimen/_18sdp"
android:layout_height="@dimen/_18sdp"
android:layout_marginBottom="@dimen/_20sdp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/img_partner_info"
android:layout_width="match_parent"
tools:text="ASdf"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:id="@+id/txt_partner_info"
android:textColor="@color/darkgray"
android:textSize="@dimen/_9ssp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton
android:id="@+id/btn_submit"

18
app/src/main/res/layout/fragment_verification_send_money_v2.xml

@ -364,10 +364,10 @@
android:textColor="@color/dark_gray"
android:textSize="@dimen/_11ssp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:layout_marginBottom="@dimen/_16sdp"
android:layout_marginTop="@dimen/_5sdp"
android:id="@+id/txt_user_aggreement"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:paddingTop="@dimen/_4sdp"
android:paddingBottom="@dimen/_4sdp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@ -375,6 +375,18 @@
android:textColor="@color/colorPrimary"
android:textSize="@dimen/_11ssp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:layout_marginBottom="@dimen/_16sdp"
android:id="@+id/txt_fraud_warning"
android:paddingTop="@dimen/_4sdp"
android:paddingBottom="@dimen/_4sdp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/gme_fraud_warning_text"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/_11ssp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton

4
app/src/main/res/values/strings.xml

@ -195,7 +195,7 @@
<string name="service_charge_text">Service Charge</string>
<string name="payout_agent_text">Payout Agent/Bank</string>
<string name="i_have_read_to_text">I have read and agreed to</string>
<string name="gme_user_aggreement_text">Gme Remittance User Agreement</string>
<string name="gme_user_aggreement_text">1. GME Remittance User Agreement</string>
<string name="agree_and_send_text">Agree and Send</string>
<string name="enter_login_password_text">Enter Your Login Password</string>
<string name="enter_otp_password_text">Enter 4 Digit OTP Code</string>
@ -788,7 +788,7 @@
<string name="will_proceed_to_check_otp_title_text">Will proceed to check OTP</string>
<string name="new_otp_number_has_sent_text">New OTP number has re-sent</string>
<string name="verification_completed_title_text">Verification is all completed</string>
<string name="gme_fraud_warning_text">2. GME Remittance Fraud Warning</string>
</resources>
Loading…
Cancel
Save