|
@ -77,7 +77,7 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
|
|
|
|
|
|
private void performDefaultAction(Bundle savedInstanceState) { |
|
|
private void performDefaultAction(Bundle savedInstanceState) { |
|
|
toolbarTitle.setText("Today's Rate"); |
|
|
toolbarTitle.setText("Today's Rate"); |
|
|
mockData(); |
|
|
|
|
|
|
|
|
// mockData(); |
|
|
this.presenter.getAllData(); |
|
|
this.presenter.getAllData(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -101,10 +101,21 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
this.mockedData.add(new CountryPaymentService("Nepal", "NP", "123", "NPR", paymentModeList)); |
|
|
this.mockedData.add(new CountryPaymentService("Nepal", "NP", "123", "NPR", paymentModeList)); |
|
|
paymentModeRvAdapter.setData(paymentModeList); |
|
|
paymentModeRvAdapter.setData(paymentModeList); |
|
|
paymentModeRvAdapter.setSelectedItem(0); |
|
|
paymentModeRvAdapter.setSelectedItem(0); |
|
|
|
|
|
showPaymentService(paymentModeList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showPaymentService(List<PaymentMode> paymentModeList) |
|
|
|
|
|
{ |
|
|
|
|
|
if(paymentModeRvAdapter!=null) |
|
|
|
|
|
{ |
|
|
|
|
|
paymentModeRvAdapter.setData(paymentModeList); |
|
|
|
|
|
paymentModeRvAdapter.setSelectedItem(0); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private void setupRv() { |
|
|
private void setupRv() { |
|
|
paymentModeRvAdapter = new PaymentModeRvAdapter(this); |
|
|
paymentModeRvAdapter = new PaymentModeRvAdapter(this); |
|
|
paymentModeRv.setAdapter(paymentModeRvAdapter); |
|
|
paymentModeRv.setAdapter(paymentModeRvAdapter); |
|
@ -144,6 +155,7 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
Log.d("ExchangeRateV2", "Selected Country " + countryPaymentService.getCountryCode()); |
|
|
Log.d("ExchangeRateV2", "Selected Country " + countryPaymentService.getCountryCode()); |
|
|
this.selectedCountryPaymentService = countryPaymentService; |
|
|
this.selectedCountryPaymentService = countryPaymentService; |
|
|
showSelectedRecipient(countryPaymentService.getCountryCode(), countryPaymentService.getCurrency()); |
|
|
showSelectedRecipient(countryPaymentService.getCountryCode(), countryPaymentService.getCurrency()); |
|
|
|
|
|
showPaymentService(countryPaymentService.getServiceAvailable()); |
|
|
if (this.countryListingDialog != null) |
|
|
if (this.countryListingDialog != null) |
|
|
this.countryListingDialog.dismiss(); |
|
|
this.countryListingDialog.dismiss(); |
|
|
} |
|
|
} |
|
@ -175,6 +187,7 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
this.sendMoneyEditText.setText(""); |
|
|
this.sendMoneyEditText.setText(""); |
|
|
} |
|
|
} |
|
|
showSelectedRecipient(defaultCountryPaymentService.getCountryCode(), defaultCountryPaymentService.getCurrency()); |
|
|
showSelectedRecipient(defaultCountryPaymentService.getCountryCode(), defaultCountryPaymentService.getCurrency()); |
|
|
|
|
|
showPaymentService(defaultCountryPaymentService.getServiceAvailable()); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
@ -186,6 +199,7 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod |
|
|
//We are taking first item as default as we don't have any default item enlisted |
|
|
//We are taking first item as default as we don't have any default item enlisted |
|
|
CountryPaymentService firstSelectedItem=countryPaymentServiceList.get(0); |
|
|
CountryPaymentService firstSelectedItem=countryPaymentServiceList.get(0); |
|
|
showSelectedRecipient(firstSelectedItem.getCountryCode(), firstSelectedItem.getCurrency()); |
|
|
showSelectedRecipient(firstSelectedItem.getCountryCode(), firstSelectedItem.getCurrency()); |
|
|
|
|
|
showPaymentService(firstSelectedItem.getServiceAvailable()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
this.paymentServiceList = countryPaymentServiceList; |
|
|
this.paymentServiceList = countryPaymentServiceList; |
|
|