Browse Source

Coupon feature added

master
Preyea Regmi 5 years ago
parent
commit
aac5ab1753
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 4
      app/build.gradle
  3. 4
      app/src/dev/google-services.json
  4. 44
      app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/model/datav2/ExchangeCalculationModel.java
  5. 3
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2Presenter.java
  6. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2PresenterInterface.java
  7. 87
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/amountdetail/ResendMoneyAmountDetailFragment.java
  8. 32
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/adapter/rewardlisting/OrderListingRvAdapter.java
  9. 31
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/adapter/rewardlisting/RewardListingRvAdapter.java
  10. 13
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardlisting/RewardListingV2Presenter.java
  11. 6
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardlisting/RewardListingV2PresenterInterface.java
  12. 12
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/RewardParentActionListener.java
  13. 66
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardlisting/OrderHistoryFragment.java
  14. 61
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardlisting/RewardListFragment.java
  15. 13
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardlisting/RewardListingV2Activity.java
  16. 8
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/model/SendMoneyAPIRequestBody.java
  17. 8
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2Presenter.java
  18. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/presenter/SendMoneyV2PresenterInterface.java
  19. 109
      app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/view/amountdetail/AmountDetailSendMoneyFragment.java
  20. 2
      app/src/main/res/drawable/ic_rounded_background_coloured.xml
  21. 4
      app/src/main/res/layout/dialog_fingerprint_auth_prompt.xml
  22. 105
      app/src/main/res/layout/fragment_amount_detail_resend_money_v2.xml
  23. 82
      app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml
  24. 64
      app/src/main/res/layout/fragment_order_history.xml
  25. 1
      app/src/main/res/layout/fragment_reward_list.xml
  26. 1
      app/src/main/res/layout/fragment_splash_one.xml
  27. 95
      app/src/main/res/layout/order_list_item.xml
  28. 74
      app/src/main/res/layout/reward_list_item.xml

BIN
.idea/caches/build_file_checksums.ser

4
app/build.gradle

@ -87,9 +87,9 @@ android {
}
dev {
manifestPlaceholders.fileProvider = "com.gmeremit.online.gmeremittance_native.uat.fileprovider"
applicationIdSuffix ".uat"
// applicationIdSuffix ".uat"
signingConfig signingConfigs.debug
buildConfigField 'String', 'BASE_URL', '"http://gmeuat.gmeremit.com:5012/api/"'
buildConfigField 'String', 'BASE_URL', '"http://gmeuat.gmeremit.com:5022/api/"'
buildConfigField 'String', 'API_VERSION', '"v1"'
buildConfigField 'String', 'BASE_URL_SOCIAL', '"http://10.1.1.171:8080/v1/"'
debuggable true

4
app/src/dev/google-services.json

@ -10,7 +10,7 @@
"client_info": {
"mobilesdk_app_id": "1:739883569758:android:5b4ad7782aa80f79",
"android_client_info": {
"package_name": "com.gmeremit.online.gmeremittance_native.uat"
"package_name": "com.gmeremit.online.gmeremittance_native"
}
},
"oauth_client": [
@ -18,7 +18,7 @@
"client_id": "739883569758-ie4mgucpasd3mtjt217u22lliiec8rva.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.gmeremit.online.gmeremittance_native.uat",
"package_name": "com.gmeremit.online.gmeremittance_native",
"certificate_hash": "899e8b46832d0e33ea0b16c07a16f5a12aececd2"
}
},

44
app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/model/datav2/ExchangeCalculationModel.java

@ -50,6 +50,18 @@ public class ExchangeCalculationModel {
@SerializedName("EXRATEID")
@Expose
private String exrateId;
@SerializedName("discountValue")
@Expose
private String discountValue;
@SerializedName("discountType")
@Expose
private String discountType;
@SerializedName("discountPercent")
@Expose
private String discountPercent;
@SerializedName("couponName")
@Expose
private String couponName;
public String getId() {
return id;
@ -170,4 +182,36 @@ public class ExchangeCalculationModel {
public void setExrateId(String exrateId) {
this.exrateId = exrateId;
}
public String getDiscountValue() {
return discountValue;
}
public void setDiscountValue(String discountValue) {
this.discountValue = discountValue;
}
public String getDiscountType() {
return discountType;
}
public void setDiscountType(String discountType) {
this.discountType = discountType;
}
public String getDiscountPercent() {
return discountPercent;
}
public void setDiscountPercent(String discountPercent) {
this.discountPercent = discountPercent;
}
public String getCouponName() {
return couponName;
}
public void setCouponName(String couponName) {
this.couponName = couponName;
}
}

3
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2Presenter.java

@ -101,7 +101,7 @@ public class ReSendMoneyV2Presenter extends BasePresenter implements ReSendMoney
@Override
public void setSendingAmount(String sendingAmount, String selectedExRate, String recievingAmount, String transferFee,
boolean shouldCalcByRecipient, String forexId, String transferAmount) {
boolean shouldCalcByRecipient, String forexId, String transferAmount,String schemeId) {
resendRelatedData.getRemitDetail().setCollAmt(Utils.removeSpecialCharacterAndDecimalFromCurrency(sendingAmount));
resendRelatedData.getRemitDetail().setExRate(selectedExRate);
@ -111,6 +111,7 @@ public class ReSendMoneyV2Presenter extends BasePresenter implements ReSendMoney
resendRelatedData.getRemitDetail().setCalBy(shouldCalcByRecipient ? Constants.CALC_BY_RECIPEINT : Constants.CALC_BY_SENDER);
resendRelatedData.getRemitDetail().setForeXSESSIONID(forexId);
resendRelatedData.getRemitDetail().setTransferAmt(transferAmount);
resendRelatedData.getRemitDetail().setSchemeId(schemeId);
}

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2PresenterInterface.java

@ -32,7 +32,7 @@ public interface ReSendMoneyV2PresenterInterface extends BasePresenterInterface
VerificationViewModel getVerificationRelatedData();
void setSendingAmount(String sendingAmount, String selectedExRate, String recievingAmount, String transferFee, boolean calcBy, String forexId,String transferAmount);
void setSendingAmount(String sendingAmount, String selectedExRate, String recievingAmount, String transferFee, boolean calcBy, String forexId,String transferAmount,String schemeId);
void clearExRateData();

87
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/amountdetail/ResendMoneyAmountDetailFragment.java

@ -2,9 +2,13 @@ package com.gmeremit.online.gmeremittance_native.resendV2.view.amountdetail;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewCompat;
import android.text.Editable;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextWatcher;
import android.text.style.ForegroundColorSpan;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@ -62,6 +66,19 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
@BindView(R.id.recepientFlagImageView)
ImageView recepientFlagImageView;
@BindView(R.id.gmeCouponTxt)
TextView gmeCouponTxt;
@BindView(R.id.gmeCouponTitleTxt)
TextView gmeCouponTitleTxt;
@BindView(R.id.couponViewContainer)
View couponViewContainer;
@BindView(R.id.couponBottomView)
View couponBottomView;
@BindView(R.id.rootView)
ViewGroup rootView;
@ -88,6 +105,7 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
private String selectedExRateId;
private String selectedExRateWithoutTrunc;
private String selectedTransferAmount;
private String selectedSchemeId;
@Override
@ -178,7 +196,7 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
hideKeyBoard();
sendMoneyEditText.clearFocus();
recieveMoneyEditText.clearFocus();
((ReSendMoneyActionListener) getActivity()).getPresenter().setSendingAmount(sendMoneyEditText.getText().toString(), selectedExRateWithoutTrunc, selectedRecipientAmount, selectedTransferFeeAmount, shouldCaulatedByRecipient, selectedExRateId, selectedTransferAmount);
((ReSendMoneyActionListener) getActivity()).getPresenter().setSendingAmount(sendMoneyEditText.getText().toString(), selectedExRateWithoutTrunc, selectedRecipientAmount, selectedTransferFeeAmount, shouldCaulatedByRecipient, selectedExRateId, selectedTransferAmount,selectedSchemeId);
((ReSendMoneyActionListener) getActivity()).showTransactionReviewPage();
}
@ -213,7 +231,7 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
this.recepientCurrencyTextView.setText(selectedCountryCurrency);
}
private void showTransferfeeAndExRate(boolean action, String transferDisplay, String exRateDisplay) {
private void showTransferfeeAndExRate(boolean action, String transferDisplay, String exRateDisplay, String discountValue) {
if (action) {
@ -227,18 +245,32 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
if (this.transferFeeTxtView.getVisibility() == View.VISIBLE)
this.transferFeeTxtView.setVisibility(View.INVISIBLE);
this.transferFeeTxtView.setText(transferDisplay);
Spannable transString = new SpannableString(transferDisplay + discountValue);
transString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getActivity(), R.color.darkgray)), 0, transferDisplay.length() , Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
transString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getActivity(), R.color.colorPrimary)), transferDisplay.length(), transferDisplay.length() + discountValue.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
transferFeeTxtView.setText(transString);
this.transferFeeTxtView.setTranslationY(this.transferFeeTxtView.getHeight());
this.transferFeeTxtView.setVisibility(View.VISIBLE);
ViewCompat.animate(this.transferFeeTxtView).translationY(0).setDuration(550).setInterpolator(this.interpolator).start();
if (couponViewContainer.getVisibility() != View.VISIBLE) {
couponViewContainer.setVisibility(View.VISIBLE);
couponBottomView.setVisibility(View.VISIBLE);
}
} else {
if (exchangeRateTxtView.getVisibility() == View.VISIBLE)
this.exchangeRateTxtView.setVisibility(View.INVISIBLE);
if (transferFeeTxtView.getVisibility() == View.VISIBLE) {
if (transferFeeTxtView.getVisibility() == View.VISIBLE)
this.transferFeeTxtView.setVisibility(View.INVISIBLE);
if (couponViewContainer.getVisibility() == View.VISIBLE) {
couponViewContainer.setVisibility(View.INVISIBLE);
couponBottomView.setVisibility(View.INVISIBLE);
}
}
}
@ -253,6 +285,30 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
return amount != null && amount.length() > 0;
}
private void showCoupon(String discountValue, String discountType, String schemeId, String discountPercent, String couponName) {
String couponString = "";
if (schemeId == null || schemeId.length() < 1) {
couponString = "0";
} else {
//Percent type discount
if (discountType.equalsIgnoreCase("1")) {
couponString = couponName + " (" + discountPercent + "%)";
}
//Value type discount
else {
couponString = couponName + " (" + discountValue + " KRW)";
}
}
gmeCouponTxt.setText(couponString);
couponViewContainer.setVisibility(View.VISIBLE);
couponBottomView.setVisibility(View.VISIBLE);
}
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@ -293,12 +349,23 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
selectedsendingCurrency = data.getCollCurr();
selectedExRateId = data.getExrateId();
selectedTransferAmount = data.getsAmt();
selectedSchemeId = data.getSchemeId();
//TODO Dummy data
data.setSchemeId("666");
data.setDiscountType("1");
data.setDiscountValue("5000.7324423429");
data.setDiscountPercent("10");
data.setCouponName("Gold");
String transferDisplay = " - " + Utils.formatCurrency(selectedTransferFeeAmount) + " " + selectedsendingCurrency + " (" + getString(R.string.transfer_fee_included_text) + ")";
String exRateDisplay = " " + selectedExRate + " (" + getString(R.string.current_exchange_rate_text) + ")";
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay);
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay,"");
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
showCoupon(Utils.formatCurrencyWithoutTruncatingDecimal(data.getDiscountValue()), data.getDiscountType(), data.getSchemeId(), data.getDiscountPercent(), data.getCouponName());
updateButtonToCalculate(false);
} else {
@ -321,12 +388,16 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
selectedsendingCurrency = data.getCollCurr();
selectedExRateId = data.getExrateId();
selectedTransferAmount = data.getsAmt();
selectedSchemeId = data.getSchemeId();
String transferDisplay = " - " + Utils.formatCurrency(selectedTransferFeeAmount) + " " + selectedsendingCurrency + " (" + getString(R.string.transfer_fee_included_text) + ")";
String exRateDisplay = " " + selectedExRate + " (" + getString(R.string.current_exchange_rate_text) + ")";
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay);
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay,"");
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
showCoupon(Utils.formatCurrencyWithoutTruncatingDecimal(data.getDiscountValue()), data.getDiscountType(), data.getSchemeId(), data.getDiscountPercent(), data.getCouponName());
updateButtonToCalculate(false);
} else {
showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
@ -459,7 +530,7 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
shouldCaulatedByRecipient = false;
updateRecievingAmount("");
updateButtonToCalculate(true);
showTransferfeeAndExRate(false, "", "");
showTransferfeeAndExRate(false, "", "","");
}
}
@ -480,7 +551,7 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
shouldCaulatedByRecipient = true;
updateSendAmount("");
updateButtonToCalculate(true);
showTransferfeeAndExRate(false, "", "");
showTransferfeeAndExRate(false, "", "","");
}

32
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/adapter/rewardlisting/OrderListingRvAdapter.java

@ -5,12 +5,16 @@ import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.gmeremit.online.gmeremittance_native.R;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
public class OrderListingRvAdapter extends RecyclerView.Adapter<OrderListingRvAdapter.OrderListingItemViewHolder> {
private final OrderItemSelectionListener listener;
@ -38,8 +42,7 @@ public class OrderListingRvAdapter extends RecyclerView.Adapter<OrderListingRvAd
return data.size();
}
public void setData(List<Object> data)
{
public void setData(List<Object> data) {
if (data != null && data.size() > 0) {
this.data = data;
notifyDataSetChanged();
@ -47,17 +50,34 @@ public class OrderListingRvAdapter extends RecyclerView.Adapter<OrderListingRvAd
}
public interface OrderItemSelectionListener
{
public interface OrderItemSelectionListener {
void onOrderSelected(Object order);
}
public class OrderListingItemViewHolder extends RecyclerView.ViewHolder
{
public class OrderListingItemViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.tv_date)
TextView dateTxt;
@BindView(R.id.tv_gme_order_id)
TextView orderIdTxt;
@BindView(R.id.tv_order_name)
TextView orderNameTxt;
@BindView(R.id.tv_branch_name)
TextView branchName;
@BindView(R.id.tv_order_point)
TextView orderPointTxt;
@BindView(R.id.tv_status)
TextView statusTxt;
public OrderListingItemViewHolder(@NonNull View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
}

31
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/adapter/rewardlisting/RewardListingRvAdapter.java

@ -5,7 +5,11 @@ import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.homeV2.adapters.HomeMenuRvAdapterV2;
import com.gmeremit.online.gmeremittance_native.homeV2.model.MenuItem;
@ -14,6 +18,9 @@ import com.gmeremit.online.gmeremittance_native.homeV2.view.HomeMenuItemViewHold
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
public class RewardListingRvAdapter extends RecyclerView.Adapter<RewardListingRvAdapter.RewardListingItemViewHolder> {
private final RewardCLickListener listener;
@ -34,6 +41,18 @@ public class RewardListingRvAdapter extends RecyclerView.Adapter<RewardListingRv
public void onBindViewHolder(@NonNull RewardListingItemViewHolder holder, int position) {
holder.redeemTitle.setText("");
holder.redeemPoint.setText("");
holder.redeemButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
Glide.with(holder.redeemItemImage.getContext())
.load("hasdf")
.into(holder.redeemItemImage);
}
@Override
@ -58,9 +77,21 @@ public class RewardListingRvAdapter extends RecyclerView.Adapter<RewardListingRv
public class RewardListingItemViewHolder extends RecyclerView.ViewHolder
{
@BindView(R.id.rewardItemImage)
ImageView redeemItemImage;
@BindView(R.id.rewardItemTitle)
TextView redeemTitle;
@BindView(R.id.rewardItemPoint)
TextView redeemPoint;
@BindView(R.id.redeemButton)
Button redeemButton;
public RewardListingItemViewHolder(@NonNull View itemView) {
super(itemView);
ButterKnife.bind(this,itemView);
}
}
}

13
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardlisting/RewardListingV2Presenter.java

@ -3,6 +3,9 @@ package com.gmeremit.online.gmeremittance_native.rewardV2.presenter.rewardlistin
import com.gmeremit.online.gmeremittance_native.base.BasePresenter;
import com.gmeremit.online.gmeremittance_native.rewardV2.gateway.rewardlisting.RewardListingV2Gateway;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
public class RewardListingV2Presenter extends BasePresenter implements RewardListingV2PresenterInterface,RewardListingV2InteractorInterface {
RewardListingV2PresenterInterface.RewardListingV2ContractInterface view;
@ -17,4 +20,14 @@ public class RewardListingV2Presenter extends BasePresenter implements RewardLis
public void fetchRewards() {
}
@Override
public Observable<ResponseBody> subscribeToRewardFetchingEvent() {
return null;
}
@Override
public Observable<ResponseBody> subscribeToOrderListFetchingEvent() {
return null;
}
}

6
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardlisting/RewardListingV2PresenterInterface.java

@ -3,10 +3,16 @@ package com.gmeremit.online.gmeremittance_native.rewardV2.presenter.rewardlistin
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface;
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
public interface RewardListingV2PresenterInterface extends BasePresenterInterface {
void fetchRewards();
Observable<ResponseBody> subscribeToRewardFetchingEvent();
Observable<ResponseBody> subscribeToOrderListFetchingEvent();
interface RewardListingV2ContractInterface extends BaseContractInterface
{
void lazyInstatiateView();

12
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/RewardParentActionListener.java

@ -0,0 +1,12 @@
package com.gmeremit.online.gmeremittance_native.rewardV2.view;
import com.gmeremit.online.gmeremittance_native.rewardV2.presenter.rewardlisting.RewardListingV2PresenterInterface;
import io.reactivex.Observable;
public interface RewardParentActionListener {
RewardListingV2PresenterInterface getPresenter();
}

66
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardlisting/OrderHistoryFragment.java

@ -2,16 +2,33 @@ package com.gmeremit.online.gmeremittance_native.rewardV2.view.rewardlisting;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BaseFragment;
import com.gmeremit.online.gmeremittance_native.rewardV2.adapter.rewardlisting.OrderListingRvAdapter;
import com.gmeremit.online.gmeremittance_native.rewardV2.view.RewardParentActionListener;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponseV2;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericResponseDataModel;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.disposables.CompositeDisposable;
public class OrderHistoryFragment extends BaseFragment implements OrderListingRvAdapter.OrderItemSelectionListener {
@BindView(R.id.orderListRv)
RecyclerView orderListRv;
private CompositeDisposable compositeDisposable;
private OrderListObserver orderListObserver;
private OrderListingRvAdapter orderListAdapter;
public class OrderHistoryFragment extends BaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -27,11 +44,58 @@ public class OrderHistoryFragment extends BaseFragment {
}
private void performDefaultAction(Bundle savedInstanceState) {
if (savedInstanceState == null) {
compositeDisposable.add(((RewardParentActionListener) getActivity()).getPresenter().subscribeToOrderListFetchingEvent().subscribeWith(orderListObserver));
}
}
private void setupRv() {
orderListAdapter=new OrderListingRvAdapter(this);
orderListRv.setAdapter(orderListAdapter);
}
private void initialize() {
compositeDisposable = new CompositeDisposable();
orderListObserver = new OrderListObserver();
setupRv();
}
@Override
public void onOrderSelected(Object order) {
}
@Override
public void onDestroy() {
super.onDestroy();
if (compositeDisposable != null && !compositeDisposable.isDisposed())
compositeDisposable.dispose();
}
public class OrderListObserver extends GenericApiObserverResponseV2<Object> {
@Override
protected void onSuccess(GenericResponseDataModel<Object> t) {
}
@Override
public void onFailed(String message) {
}
@Override
protected void onConnectionNotEstablished(String message) {
}
@Override
protected void unauthorizedAccess(String message) {
}
}
}

61
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardlisting/RewardListFragment.java

@ -10,19 +10,27 @@ import android.view.ViewGroup;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BaseFragment;
import com.gmeremit.online.gmeremittance_native.kycV2.presenter.kyc.KYCV2Presenter;
import com.gmeremit.online.gmeremittance_native.rewardV2.adapter.rewardlisting.RewardListingRvAdapter;
import com.gmeremit.online.gmeremittance_native.rewardV2.view.RewardParentActionListener;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponseV2;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericResponseDataModel;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.observers.DisposableObserver;
public class RewardListFragment extends BaseFragment {
public class RewardListFragment extends BaseFragment implements RewardListingRvAdapter.RewardCLickListener {
@BindView(R.id.rewards_rv)
RecyclerView rewardsRV;
@BindView(R.id.txt_reward_points)
RecyclerView txt_reward_points;
private RewardListingRvAdapter rewardListingRvAdapter;
private RewardListObserver rewardlistObserver;
private CompositeDisposable compositeDisposable;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -38,13 +46,58 @@ public class RewardListFragment extends BaseFragment {
}
private void performDefaultAction(Bundle savedInstanceState) {
if (savedInstanceState == null) {
compositeDisposable.add(((RewardParentActionListener) getActivity()).getPresenter().subscribeToRewardFetchingEvent().subscribeWith(rewardlistObserver));
}
}
private void initialize() {
compositeDisposable = new CompositeDisposable();
rewardlistObserver = new RewardListObserver();
setupRv();
}
private void setupRv() {
rewardListingRvAdapter = new RewardListingRvAdapter(this);
rewardsRV.setAdapter(rewardListingRvAdapter);
}
@Override
public void onDestroy() {
super.onDestroy();
if (compositeDisposable != null && !compositeDisposable.isDisposed())
compositeDisposable.dispose();
}
@Override
public void onRewardSelected(Object reward) {
}
public class RewardListObserver extends GenericApiObserverResponseV2<Object> {
@Override
protected void onSuccess(GenericResponseDataModel<Object> t) {
}
@Override
public void onFailed(String message) {
}
@Override
protected void onConnectionNotEstablished(String message) {
}
@Override
protected void unauthorizedAccess(String message) {
}
}
}

13
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardlisting/RewardListingV2Activity.java

@ -4,6 +4,7 @@ import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BaseActivity;
@ -12,13 +13,14 @@ import com.gmeremit.online.gmeremittance_native.kycV2.view.view2.KYCView2Fragmen
import com.gmeremit.online.gmeremittance_native.rewardV2.adapter.rewardlisting.RewardListingViewPagerAdapter;
import com.gmeremit.online.gmeremittance_native.rewardV2.presenter.rewardlisting.RewardListingV2Presenter;
import com.gmeremit.online.gmeremittance_native.rewardV2.presenter.rewardlisting.RewardListingV2PresenterInterface;
import com.gmeremit.online.gmeremittance_native.rewardV2.view.RewardParentActionListener;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
public class RewardListingV2Activity extends BaseActivity implements RewardListingV2PresenterInterface.RewardListingV2ContractInterface {
public class RewardListingV2Activity extends BaseActivity implements RewardListingV2PresenterInterface.RewardListingV2ContractInterface, RewardParentActionListener {
@BindView(R.id.rewardFormViewPager)
ViewPager viewPager;
@ -26,6 +28,7 @@ public class RewardListingV2Activity extends BaseActivity implements RewardListi
@BindView(R.id.rewardTabLayout)
TabLayout tabLayout;
private RewardListingV2PresenterInterface presenter;
private RewardListingViewPagerAdapter rewardlistingViewPagerAdapter;
private RewardListFragment rewardlistingFrag;
@ -43,7 +46,9 @@ public class RewardListingV2Activity extends BaseActivity implements RewardListi
private void performDefaultAction(Bundle savedInstanceState) {
if (savedInstanceState == null) {
presenter.fetchRewards();
} else {
} else
{
}
@ -95,4 +100,8 @@ public class RewardListingV2Activity extends BaseActivity implements RewardListi
setUpTabLayout();
}
@Override
public RewardListingV2PresenterInterface getPresenter() {
return presenter;
}
}

8
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/model/SendMoneyAPIRequestBody.java

@ -366,6 +366,14 @@ public class SendMoneyAPIRequestBody {
isUseBiometric = useBiometric;
}
public String getSchemeId() {
return schemeId;
}
public void setSchemeId(String schemeId) {
this.schemeId = schemeId;
}
@Override
public String toString() {
return "SendMoneyAPIRequestBody{" +

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

@ -59,6 +59,8 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
private String selectedCalcBy = null;
private String selectedForexId = null;
private String selectedTransferAmount = null;
private String selectedSchemeId=null;
private long countDownRemainingValue;
@ -172,7 +174,7 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
@Override
public void setSendingAmount(String sendingAmount, String recipientCurrencyCode, String selectedExRate, String recievingAmount, String transferFee,
boolean shouldCalcByRecipient, String forexId, String transferAmount) {
boolean shouldCalcByRecipient, String forexId, String transferAmount, String schemeId) {
this.selectedSendingAmount = sendingAmount;
this.selectedSendingCurrency = recipientCurrencyCode;
this.selectedExRate = selectedExRate;
@ -181,6 +183,7 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
this.selectedCalcBy = shouldCalcByRecipient ? Constants.CALC_BY_RECIPEINT : Constants.CALC_BY_SENDER;
this.selectedForexId = forexId;
this.selectedTransferAmount = transferAmount;
this.selectedSchemeId=schemeId;
}
@Override
@ -190,6 +193,7 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
selectedSendingCurrency = null;
selectedRecievingAmount = null;
selectedTransferAmount = null;
selectedSchemeId=null;
}
private boolean checkIfUserHasEnabledBiometricAuth() {
@ -307,6 +311,8 @@ public class SendMoneyV2Presenter extends BasePresenter implements SendMoneyV2Pr
sendMoneyAPIRequestBody.setTxnPassword(password);
sendMoneyAPIRequestBody.setUseBiometric(isBiometricUsed);
sendMoneyAPIRequestBody.setSchemeId(selectedSchemeId);
compositeObservable.add(
gateway.performSendMoneyTransaction(gateway.getAuth(), sendMoneyAPIRequestBody)
.subscribeOn(Schedulers.io())

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

@ -40,7 +40,7 @@ public interface SendMoneyV2PresenterInterface extends BasePresenterInterface {
VerificationViewModel getVerificationRelatedData();
void setSendingAmount(String sendingAmount, String recipientCurrencyCode, String selectedExRate, String recievingAmount, String transferFee, boolean calcBy, String forexId,String transferAmount);
void setSendingAmount(String sendingAmount, String recipientCurrencyCode, String selectedExRate, String recievingAmount, String transferFee, boolean calcBy, String forexId,String transferAmount,String schemeId);
void clearExRateData();

109
app/src/main/java/com/gmeremit/online/gmeremittance_native/sendmoneyV2/view/amountdetail/AmountDetailSendMoneyFragment.java

@ -5,9 +5,13 @@ import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewCompat;
import android.text.Editable;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextWatcher;
import android.text.style.ForegroundColorSpan;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@ -53,12 +57,26 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
@BindView(R.id.transferFeeTxtView)
TextView transferFeeTxtView;
@BindView(R.id.exchangeRateTxtView)
TextView exchangeRateTxtView;
@BindView(R.id.recepientCurrencyTextView)
TextView recepientCurrencyTextView;
@BindView(R.id.gmeCouponTxt)
TextView gmeCouponTxt;
@BindView(R.id.gmeCouponTitleTxt)
TextView gmeCouponTitleTxt;
@BindView(R.id.couponViewContainer)
View couponViewContainer;
@BindView(R.id.couponBottomView)
View couponBottomView;
@BindView(R.id.countrySelectionSpinner)
ViewGroup countrySelectionSpinner;
@ -92,6 +110,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
private String selectedExRateId;
private String selectedExRateWithoutTrunc;
private String selectedTransferAmount;
private String selectedSchemeId;
@Override
@ -194,8 +213,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
private boolean focusOutAndHideKeyboard() {
if(sendMoneyEditText.hasFocus()||recieveMoneyEditText.hasFocus())
{
if (sendMoneyEditText.hasFocus() || recieveMoneyEditText.hasFocus()) {
View currentViewWithFocus = rootView.getFocusedChild();
if (currentViewWithFocus != null)
@ -221,7 +239,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
hideKeyBoard();
sendMoneyEditText.clearFocus();
recieveMoneyEditText.clearFocus();
((SendMoneyActionListener) getActivity()).getPresenter().setSendingAmount(sendMoneyEditText.getText().toString(), amountDetailRelatedData.getDefaultSelectedCurrency().getCurrencyCode(), selectedExRateWithoutTrunc, selectedRecipientAmount, selectedTransferFeeAmount, shouldCaulatedByRecipient, selectedExRateId,selectedTransferAmount);
((SendMoneyActionListener) getActivity()).getPresenter().setSendingAmount(sendMoneyEditText.getText().toString(), amountDetailRelatedData.getDefaultSelectedCurrency().getCurrencyCode(), selectedExRateWithoutTrunc, selectedRecipientAmount, selectedTransferFeeAmount, shouldCaulatedByRecipient, selectedExRateId, selectedTransferAmount, selectedSchemeId);
((SendMoneyActionListener) getActivity()).showTransactionReviewPage();
}
@ -265,7 +283,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
this.recepientCurrencyTextView.setText(selectedCountryCurrency);
}
private void showTransferfeeAndExRate(boolean action, String transferDisplay, String exRateDisplay) {
private void showTransferfeeAndExRate(boolean action, String transferDisplay, String exRateDisplay, String discountValue) {
if (action) {
@ -279,18 +297,32 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
if (this.transferFeeTxtView.getVisibility() == View.VISIBLE)
this.transferFeeTxtView.setVisibility(View.INVISIBLE);
this.transferFeeTxtView.setText(transferDisplay);
Spannable transString = new SpannableString(transferDisplay + discountValue);
transString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getActivity(), R.color.darkgray)), 0, transferDisplay.length() , Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
transString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getActivity(), R.color.colorPrimary)), transferDisplay.length(), transferDisplay.length() + discountValue.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
transferFeeTxtView.setText(transString);
this.transferFeeTxtView.setTranslationY(this.transferFeeTxtView.getHeight());
this.transferFeeTxtView.setVisibility(View.VISIBLE);
ViewCompat.animate(this.transferFeeTxtView).translationY(0).setDuration(550).setInterpolator(this.interpolator).start();
if (couponViewContainer.getVisibility() != View.VISIBLE) {
couponViewContainer.setVisibility(View.VISIBLE);
couponBottomView.setVisibility(View.VISIBLE);
}
} else {
if (exchangeRateTxtView.getVisibility() == View.VISIBLE)
this.exchangeRateTxtView.setVisibility(View.INVISIBLE);
if (transferFeeTxtView.getVisibility() == View.VISIBLE) {
if (transferFeeTxtView.getVisibility() == View.VISIBLE)
this.transferFeeTxtView.setVisibility(View.INVISIBLE);
if (couponViewContainer.getVisibility() == View.VISIBLE) {
couponViewContainer.setVisibility(View.INVISIBLE);
couponBottomView.setVisibility(View.INVISIBLE);
}
}
}
@ -316,8 +348,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
updateRecievingAmount("");
updateButtonToCalculate(true);
shouldCaulatedByRecipient = false;
}
else
} else
getForex();
}
@ -368,19 +399,30 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
selectedsendingCurrency = data.getCollCurr();
selectedExRateId = data.getExrateId();
selectedTransferAmount = data.getsAmt();
selectedSchemeId = data.getSchemeId();
//TODO Dummy data
data.setSchemeId("666");
data.setDiscountType("1");
data.setDiscountValue("5000.7324423429");
data.setDiscountPercent("10");
data.setCouponName("Gold");
String transferDisplay = " -" + Utils.formatCurrency(selectedTransferFeeAmount) + " " + selectedsendingCurrency + " (" + getString(R.string.transfer_fee_included_text) + ")";
String exRateDisplay = " " + selectedExRate + " (" + getString(R.string.current_exchange_rate_text) + ")";
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay);
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay, "");
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
showCoupon(Utils.formatCurrencyWithoutTruncatingDecimal(data.getDiscountValue()), data.getDiscountType(), data.getSchemeId(), data.getDiscountPercent(), data.getCouponName());
updateButtonToCalculate(false);
} else
showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}
else
{
} else {
scheduleTaskLater(() -> {
showProgressBar(false, "");
if (exchangeCalculationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {
@ -393,12 +435,16 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
selectedsendingCurrency = data.getCollCurr();
selectedExRateId = data.getExrateId();
selectedTransferAmount = data.getsAmt();
selectedSchemeId = data.getSchemeId();
String transferDisplay = " - " + Utils.formatCurrency(selectedTransferFeeAmount) + " " + selectedsendingCurrency + " (" + getString(R.string.transfer_fee_included_text) + ")";
String exRateDisplay = " " + selectedExRate + " (" + getString(R.string.current_exchange_rate_text) + ")";
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay);
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay, data.getDiscountValue());
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
showCoupon(Utils.formatCurrencyWithoutTruncatingDecimal(data.getDiscountValue()), data.getDiscountType(), data.getSchemeId(), data.getDiscountPercent(), data.getCouponName());
updateButtonToCalculate(false);
} else
@ -413,9 +459,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
if (isUIReady()) {
showProgressBar(false, "");
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
}
else
{
} else {
scheduleTaskLater(() -> {
showProgressBar(false, "");
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
@ -428,9 +472,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
if (isUIReady()) {
showProgressBar(false, "");
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null);
}
else
{
} else {
scheduleTaskLater(() -> {
showProgressBar(false, "");
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null);
@ -446,6 +488,30 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
}
}
private void showCoupon(String discountValue, String discountType, String schemeId, String discountPercent, String couponName) {
String couponString = "";
if (schemeId == null || schemeId.length() < 1) {
couponString = "0";
} else {
//Percent type discount
if (discountType.equalsIgnoreCase("1")) {
couponString = couponName + " (" + discountPercent + "%)";
}
//Value type discount
else {
couponString = couponName + " (" + discountValue + " KRW)";
}
}
gmeCouponTxt.setText(couponString);
couponViewContainer.setVisibility(View.VISIBLE);
couponBottomView.setVisibility(View.VISIBLE);
}
public class AmountDetailRelatedDataObserver extends GenericApiObserverResponse<AmountDetailRelatedDataModel> {
@Override
@ -502,7 +568,6 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
}
private void updateButtonToCalculate(boolean action) {
shouldCalculateExRate = action;
if (action)
@ -585,7 +650,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
shouldCaulatedByRecipient = false;
updateRecievingAmount("");
updateButtonToCalculate(true);
showTransferfeeAndExRate(false, "", "");
showTransferfeeAndExRate(false, "", "", "");
}
}
@ -606,7 +671,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
shouldCaulatedByRecipient = true;
updateSendAmount("");
updateButtonToCalculate(true);
showTransferfeeAndExRate(false, "", "");
showTransferfeeAndExRate(false, "", "", "");
}

2
app/src/main/res/drawable/ic_rounded_background_coloured.xml

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/btn_disabled" />
<solid android:color="@color/darkgray2" />
<corners android:radius="30dp" />
</shape>

4
app/src/main/res/layout/dialog_fingerprint_auth_prompt.xml

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@ -10,8 +11,7 @@
android:id="@+id/fingerprintScannerImgView"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_gravity="center"
/>
android:layout_gravity="center" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/txt_dialog_title"

105
app/src/main/res/layout/fragment_amount_detail_resend_money_v2.xml

@ -93,6 +93,10 @@
android:textStyle="bold"
android:textColor="@color/white"
android:textSize="15sp"/>
<View
android:layout_gravity="center_vertical"
android:layout_width="19dp"
android:layout_height="25dp" />
</LinearLayout>
</FrameLayout>
@ -112,7 +116,7 @@
android:layout_height="50dp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/transferFeeTxtView"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="@color/darkgray"
android:gravity="center_vertical"
@ -201,26 +205,111 @@
android:layout_gravity="center"
android:layout_width="50dp"
android:layout_height="45dp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/recepientCurrencyTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:id="@+id/recepientCurrencyTextView"
android:text="KRW"
android:paddingStart="5dp"
android:paddingEnd="3dp"
android:paddingRight="3dp"
android:paddingLeft="5dp"
android:paddingEnd="5dp"
android:paddingRight="5dp"
android:text="KRW"
android:textStyle="bold"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold" />
android:textSize="15sp"/>
<ImageView
android:background="@drawable/outline_keyboard_arrow_down_white_24"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
<View
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray"/>
<android.support.constraint.ConstraintLayout
android:id="@+id/couponViewContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="8dp"
android:visibility="gone">
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/gmeCouponTitleTxt"
android:layout_width="86dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Coupon"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/view6"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view6"
android:layout_width="2dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@color/gray"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/gmeCouponTxt"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/gmeCouponTitleTxt"
app:layout_constraintTop_toTopOf="parent" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/gmeCouponTxt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/gmeCoupontDropDown"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/view6"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/gmeCoupontDropDown"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_arrow_down"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/gmeCouponTxt"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
<View
android:id="@+id/couponBottomView"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray"/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton
android:id="@+id/amountDetailContinueButton"

82
app/src/main/res/layout/fragment_amount_detail_send_money_v2.xml

@ -116,7 +116,7 @@
android:layout_height="50dp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/transferFeeTxtView"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="@color/darkgray"
android:gravity="center_vertical"
@ -229,8 +229,88 @@
</FrameLayout>
</LinearLayout>
<View
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray"/>
<android.support.constraint.ConstraintLayout
android:id="@+id/couponViewContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="8dp"
android:visibility="gone">
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/gmeCouponTitleTxt"
android:layout_width="86dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Coupon"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/view6"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view6"
android:layout_width="2dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@color/gray"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/gmeCouponTxt"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/gmeCouponTitleTxt"
app:layout_constraintTop_toTopOf="parent" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/gmeCouponTxt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:gravity="center"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/gmeCoupontDropDown"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/view6"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/gmeCoupontDropDown"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_arrow_down"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/gmeCouponTxt"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
<View
android:id="@+id/couponBottomView"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray"/>
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton
android:id="@+id/amountDetailContinueButton"
android:layout_marginTop="40dp"

64
app/src/main/res/layout/fragment_order_history.xml

@ -1,9 +1,9 @@
<?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="match_parent"
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/searchViewContainer"
@ -12,7 +12,10 @@
android:background="@color/send_money_bg_grey"
android:focusableInTouchMode="true"
android:orientation="horizontal"
android:padding="18dp">
android:padding="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="wrap_content"
@ -25,8 +28,8 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical"
@ -46,24 +49,29 @@
</LinearLayout>
<LinearLayout
android:id="@+id/dateContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="8dp"
android:orientation="horizontal"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:visibility="gone">
android:paddingBottom="4dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchViewContainer">
<TextView
android:id="@+id/tv_from_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:gravity="center"
android:padding="3dp"
android:textColor="@color/darkgray"
@ -72,10 +80,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:gravity="center"
android:padding="3dp"
android:text="-"
@ -86,23 +94,41 @@
android:id="@+id/tv_to_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:gravity="center"
android:padding="3dp"
android:textColor="@color/darkgray"
android:textSize="11sp" />
</LinearLayout>
<android.support.constraint.Barrier
android:id="@+id/barrier4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="dateContainer" />
<android.support.v7.widget.RecyclerView
android:id="@+id/transactionHistoryRv"
android:id="@+id/orderListRv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@id/barrier4" />
</LinearLayout>
<android.support.constraint.ConstraintLayout
android:id="@+id/filterLayout"
android:layout_width="match_parent"
android:layout_height="80dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>

1
app/src/main/res/layout/fragment_reward_list.xml

@ -87,6 +87,7 @@
android:id="@+id/rewards_rv"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layoutManager="android.support.v7.widget.GridLayoutManager"
android:layout_weight="1"
android:paddingEnd="14dp"
android:paddingStart="14dp" />

1
app/src/main/res/layout/fragment_splash_one.xml

@ -15,7 +15,6 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:src="@drawable/ic_send_money_vd"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

95
app/src/main/res/layout/order_list_item.xml

@ -1,6 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:txtViewfont="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/ic_rounded_background_brightgray"
android:padding="6dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_height="wrap_content">
<LinearLayout
android:padding="5dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/tv_date"
android:layout_width="0dp"
android:layout_weight=".5"
android:layout_height="match_parent"
app:txtfontName="@string/regular"
android:gravity="left"
android:text=""
android:textColor="@color/darkgray"
android:textSize="12sp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/tv_gme_order_id"
android:layout_width="0dp"
android:layout_weight=".5"
android:layout_height="match_parent"
android:gravity="right"
android:text=""
app:txtfontName="@string/regular"
android:textColor="@color/darkgray"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:padding="5dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/tv_order_name"
android:layout_width="0dp"
app:txtfontName="@string/bold"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="left"
android:text=""
android:textColor="@color/darkgray"
android:textSize="17sp" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/tv_branch_name"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="right"
app:txtfontName="@string/semibold"
android:text=""
android:textColor="@color/colorPrimary"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:padding="5dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/tv_order_point"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="left"
android:text=""
android:textColor="@color/darkgray"
android:textSize="12sp" />
</android.support.constraint.ConstraintLayout>
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unpaid"
txtViewfont:txtfontName="@string/semibold"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>

74
app/src/main/res/layout/reward_list_item.xml

@ -1,6 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@drawable/ic_rounded_white_bg_with_inset"
android:layout_height="wrap_content">
<ImageView
app:srcCompat="@drawable/vd_fingerprint_on"
android:id="@+id/rewardItemImage"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintBottom_toTopOf="@+id/rewardItemTitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.57" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/rewardItemTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sunglasses"
android:gravity="center"
app:layout_constraintBottom_toTopOf="@+id/rewardItemPoint"
app:layout_constraintEnd_toEndOf="@+id/rewardItemImage"
app:layout_constraintStart_toStartOf="@+id/rewardItemImage"
app:layout_constraintTop_toBottomOf="@+id/rewardItemImage" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView
android:id="@+id/rewardItemPoint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="5000 points"
android:gravity="center"
app:layout_constraintBottom_toTopOf="@+id/view5"
app:layout_constraintEnd_toEndOf="@+id/rewardItemTitle"
app:layout_constraintStart_toStartOf="@+id/rewardItemTitle"
app:layout_constraintTop_toBottomOf="@+id/rewardItemTitle" />
<View
android:id="@+id/view5"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintBottom_toTopOf="@+id/redeemButton"
app:layout_constraintEnd_toEndOf="@+id/rewardItemPoint"
app:layout_constraintStart_toStartOf="@+id/rewardItemPoint"
app:layout_constraintTop_toBottomOf="@+id/rewardItemPoint" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton
android:id="@+id/redeemButton"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/ic_rounded_background_coloured"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:text="Redeem"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/rewardItemImage"
app:layout_constraintEnd_toEndOf="@+id/view5"
app:layout_constraintStart_toStartOf="@+id/view5"
app:layout_constraintTop_toBottomOf="@+id/view5" />
</android.support.constraint.ConstraintLayout>
Loading…
Cancel
Save