|
|
@ -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) { |
|
|
|