preyearegmi
6 years ago
28 changed files with 2409 additions and 198 deletions
-
BIN.idea/caches/build_file_checksums.ser
-
BIN.idea/caches/gradle_models.ser
-
29.idea/codeStyles/Project.xml
-
6.idea/encodings.xml
-
15.idea/gradle.xml
-
39.idea/misc.xml
-
12.idea/modules.xml
-
6.idea/vcs.xml
-
4app/build.gradle
-
24app/src/main/AndroidManifest.xml
-
1app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/HomeParentViewContractV2.java
-
17app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/view/HomeActivityV2.java
-
4app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/view/HomeFragmentV2.java
-
21app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/ReSendMoneyActionListener.java
-
28app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/ReSendMoneyScreenManager.java
-
102app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/gateway/ReSendMoneyV2Gateway.java
-
52app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/ReSendMoneyV2InteractorInterface.java
-
272app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/ReSendMoneyV2Presenter.java
-
48app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/ReSendMoneyV2PresenterInterface.java
-
175app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/ReSendMoneyV2Activity.java
-
519app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/amountdetail/ResendMoneyAmountDetailFragment.java
-
195app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/verification/ResendVerificationDetailFragment.java
-
BINapp/src/main/res/drawable-xxhdpi/ic_menu_resendmoney.png
-
22app/src/main/res/layout/activity_re_send_money_v2.xml
-
238app/src/main/res/layout/fragment_amount_detail_resend_money_v2.xml
-
393app/src/main/res/layout/fragment_verification_resend_money_v2.xml
-
31app/src/main/res/layout/nav_drawer_fragment.xml
-
354app/src/main/res/values/strings.xml
@ -0,0 +1,29 @@ |
|||
<component name="ProjectCodeStyleConfiguration"> |
|||
<code_scheme name="Project" version="173"> |
|||
<Objective-C-extensions> |
|||
<file> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" /> |
|||
</file> |
|||
<class> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" /> |
|||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" /> |
|||
</class> |
|||
<extensions> |
|||
<pair source="cpp" header="h" fileNamingConvention="NONE" /> |
|||
<pair source="c" header="h" fileNamingConvention="NONE" /> |
|||
</extensions> |
|||
</Objective-C-extensions> |
|||
</code_scheme> |
|||
</component> |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="Encoding"> |
|||
<file url="PROJECT" charset="UTF-8" /> |
|||
</component> |
|||
</project> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="GradleSettings"> |
|||
<option name="linkedExternalProjectsSettings"> |
|||
<GradleProjectSettings> |
|||
<compositeConfiguration> |
|||
<compositeBuild compositeDefinitionSource="SCRIPT" /> |
|||
</compositeConfiguration> |
|||
<option name="distributionType" value="DEFAULT_WRAPPED" /> |
|||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> |
|||
<option name="resolveModulePerSourceSet" value="false" /> |
|||
</GradleProjectSettings> |
|||
</option> |
|||
</component> |
|||
</project> |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="NullableNotNullManager"> |
|||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" /> |
|||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> |
|||
<option name="myNullables"> |
|||
<value> |
|||
<list size="10"> |
|||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> |
|||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> |
|||
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" /> |
|||
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> |
|||
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> |
|||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" /> |
|||
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" /> |
|||
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" /> |
|||
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" /> |
|||
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" /> |
|||
</list> |
|||
</value> |
|||
</option> |
|||
<option name="myNotNulls"> |
|||
<value> |
|||
<list size="9"> |
|||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> |
|||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> |
|||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> |
|||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> |
|||
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" /> |
|||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" /> |
|||
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" /> |
|||
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" /> |
|||
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" /> |
|||
</list> |
|||
</value> |
|||
</option> |
|||
</component> |
|||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" /> |
|||
</project> |
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="ProjectModuleManager"> |
|||
<modules> |
|||
<module fileurl="file://$PROJECT_DIR$/SpinnerDatePickerLib-release/SpinnerDatePickerLib-release.iml" filepath="$PROJECT_DIR$/SpinnerDatePickerLib-release/SpinnerDatePickerLib-release.iml" /> |
|||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
|||
<module fileurl="file://$PROJECT_DIR$/gme-android.iml" filepath="$PROJECT_DIR$/gme-android.iml" /> |
|||
<module fileurl="file://$PROJECT_DIR$/httpclient-release/httpclient-release.iml" filepath="$PROJECT_DIR$/httpclient-release/httpclient-release.iml" /> |
|||
<module fileurl="file://$PROJECT_DIR$/securitykeypad/securitykeypad.iml" filepath="$PROJECT_DIR$/securitykeypad/securitykeypad.iml" /> |
|||
</modules> |
|||
</component> |
|||
</project> |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="VcsDirectoryMappings"> |
|||
<mapping directory="$PROJECT_DIR$" vcs="Git" /> |
|||
</component> |
|||
</project> |
@ -0,0 +1,21 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.resendV2.presenter.ReSendMoneyV2PresenterInterface; |
|||
|
|||
/** |
|||
* Created by Preyea |
|||
* Interface to bind send money indivisual transaction view with the contained activity. |
|||
*/ |
|||
public interface ReSendMoneyActionListener { |
|||
|
|||
|
|||
|
|||
void showTransactionReviewPage(); |
|||
|
|||
ReSendMoneyV2PresenterInterface getPresenter(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2; |
|||
|
|||
import android.support.annotation.LayoutRes; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseFragment; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.view.amountdetail.ResendMoneyAmountDetailFragment; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.view.verification.ResendVerificationDetailFragment; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.amountdetail.AmountDetailSendMoneyFragment; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.payoutmode.PayoutModeSendMoneyFragment; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.verification.VerificationSendMoneyFragment; |
|||
|
|||
public class ReSendMoneyScreenManager |
|||
{ |
|||
public static BaseFragment getReSendMoneyScreenFromId(@LayoutRes int layoutID ) |
|||
{ |
|||
switch(layoutID) |
|||
{ |
|||
|
|||
case R.layout.fragment_amount_detail_resend_money_v2: |
|||
return new ResendMoneyAmountDetailFragment(); |
|||
case R.layout.fragment_verification_resend_money_v2: |
|||
return new ResendVerificationDetailFragment(); |
|||
default: |
|||
return null; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.gateway; |
|||
|
|||
import android.content.SharedPreferences; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.GmeApplication; |
|||
import com.gmeremit.online.gmeremittance_native.agentsV2.model.AgentsListApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.agentsV2.presenter.AgentListV2InteractorInterface; |
|||
import com.gmeremit.online.gmeremittance_native.base.PrefKeys; |
|||
import com.gmeremit.online.gmeremittance_native.base.PrivilegedGateway; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.datav2.ExchangeCalculationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.presenter.ReSendMoneyV2InteractorInterface; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyAPIRequestBody; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionResponseBody; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.BranchListApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.AccountValidationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.PayoutModeApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.presenter.SendMoneyV2InteractorInterface; |
|||
import com.gmeremit.online.gmeremittance_native.utils.https.HttpClientV2; |
|||
import com.google.gson.Gson; |
|||
import com.google.gson.GsonBuilder; |
|||
import com.google.gson.JsonObject; |
|||
|
|||
import io.reactivex.Observable; |
|||
|
|||
public class ReSendMoneyV2Gateway extends PrivilegedGateway implements ReSendMoneyV2InteractorInterface.ReSendMoneyV2GatewayInterface { |
|||
|
|||
private final ReSendMoneyV2InteractorInterface interactor; |
|||
|
|||
|
|||
public ReSendMoneyV2Gateway(ReSendMoneyV2InteractorInterface sendMoneyV2InteractorInterface) { |
|||
this.interactor=sendMoneyV2InteractorInterface; |
|||
} |
|||
|
|||
@Override |
|||
public Observable<ExchangeCalculationApiResponse> sendDataForForexCalculation(String auth, String senderCountryId, String senderCurrency, String recieverCurrency, |
|||
String senderAmount, String recieverAmount, String paymentMethodId, |
|||
String calculationPreference, String recipientCountryName, String recieverCountryId, |
|||
String bankId,String payoutPartnerId,String userID,String paymentType) { |
|||
JsonObject jsonObject=new JsonObject(); |
|||
jsonObject.addProperty("sCountry",senderCountryId); |
|||
jsonObject.addProperty("sCurrency",senderCurrency); |
|||
jsonObject.addProperty("pCurrency",recieverCurrency); |
|||
jsonObject.addProperty("calcBy",calculationPreference); |
|||
jsonObject.addProperty("cAmount",senderAmount); |
|||
jsonObject.addProperty("pAmount",recieverAmount); |
|||
jsonObject.addProperty("serviceType",paymentMethodId); |
|||
jsonObject.addProperty("pCountry",recieverCountryId); |
|||
jsonObject.addProperty("pCountryName",recipientCountryName); |
|||
|
|||
jsonObject.addProperty("pAgent",bankId); |
|||
jsonObject.addProperty("paymentType",paymentType); |
|||
jsonObject.addProperty("payOutPartner",payoutPartnerId); |
|||
jsonObject.addProperty("userId",userID); |
|||
|
|||
return HttpClientV2.getInstance().calculateForSendMoneyExchangeRateV2(auth,jsonObject); |
|||
} |
|||
|
|||
@Override |
|||
public Observable<BranchListApiResponse> getBranchListFromNetwork(String auth, String countryCode, String bankId, String searchKeyword) { |
|||
return HttpClientV2.getInstance().getBranchListV2(auth,countryCode,bankId,searchKeyword); |
|||
} |
|||
|
|||
@Override |
|||
public Observable<AccountValidationApiResponse> validateAccountFromServer(String auth, String idType, String idNumber, String customerFirstName, |
|||
String customerLastName, String receiverFirstName, String receiverLastName, |
|||
String country, String accountType, String issuerCode, String accountNo, |
|||
String amount, String bankCode, String payoutPartner, String processId) { |
|||
|
|||
JsonObject jsonObject=new JsonObject(); |
|||
jsonObject.addProperty("idType",idType); |
|||
jsonObject.addProperty("idNumber",idNumber); |
|||
jsonObject.addProperty("customerFirstName",customerFirstName); |
|||
jsonObject.addProperty("customerLastName",customerLastName); |
|||
jsonObject.addProperty("receiverFirstName",receiverFirstName); |
|||
jsonObject.addProperty("receiverLastName",receiverLastName); |
|||
jsonObject.addProperty("country",country); |
|||
jsonObject.addProperty("accountType",accountType); |
|||
jsonObject.addProperty("issuerCode",issuerCode); |
|||
|
|||
jsonObject.addProperty("accountNo",accountNo); |
|||
jsonObject.addProperty("amount",amount); |
|||
jsonObject.addProperty("bankCode",bankCode); |
|||
jsonObject.addProperty("payoutPartner",payoutPartner); |
|||
jsonObject.addProperty("processId",processId); |
|||
|
|||
return HttpClientV2.getInstance().accountValidationV2(auth,jsonObject); |
|||
} |
|||
|
|||
@Override |
|||
public Observable<SendMoneyTransactionResponseBody> performSendMoneyTransaction(String auth, SendMoneyAPIRequestBody requestBody) { |
|||
return HttpClientV2.getInstance().performSendMoneyTransactionV2(auth,requestBody); |
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public Observable<PayoutModeApiResponse> getAgentInfoListFromNetwork(String auth, String recipientCountryId, String recipientId) { |
|||
return HttpClientV2.getInstance().getPayoutModeForSendMoneyV2(auth,recipientCountryId,recipientId); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.presenter; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.agentsV2.model.AgentsListApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseInteractorInterface; |
|||
import com.gmeremit.online.gmeremittance_native.base.PrivilegedGatewayInterface; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.datav2.ExchangeCalculationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyAPIRequestBody; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionResponseBody; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.BranchListApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.AccountValidationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.PayoutModeApiResponse; |
|||
|
|||
import io.reactivex.Observable; |
|||
|
|||
public interface ReSendMoneyV2InteractorInterface extends BaseInteractorInterface { |
|||
|
|||
|
|||
interface ReSendMoneyV2GatewayInterface extends PrivilegedGatewayInterface |
|||
{ |
|||
|
|||
Observable<PayoutModeApiResponse> getAgentInfoListFromNetwork(String auth,String recipientCountryId, String recipientId); |
|||
|
|||
Observable<ExchangeCalculationApiResponse> sendDataForForexCalculation(String auth, String senderCountryId, String senderCurrency, String recieverCurrency, |
|||
String senderAmount, String recieverAmount, String paymentMethodId, |
|||
String calculationPreference, String recipientCountryName, String recieverCountryId, |
|||
String bankId,String payoutPartnerId,String userID,String paymentType); |
|||
|
|||
Observable<BranchListApiResponse> getBranchListFromNetwork(String auth, String countryCode, String bankId,String searchKeyword); |
|||
|
|||
|
|||
Observable<AccountValidationApiResponse> validateAccountFromServer(String auth, |
|||
String idType, |
|||
String idNumber, |
|||
String customerFirstName, |
|||
String customerLastName, |
|||
String receiverFirstName, |
|||
String receiverLastName, |
|||
String country, |
|||
String accountType, |
|||
String issuerCode, |
|||
String accountNo, |
|||
String amount, |
|||
String bankCode, |
|||
String payoutPartner, |
|||
String processId); |
|||
|
|||
Observable<SendMoneyTransactionResponseBody> performSendMoneyTransaction(String auth, SendMoneyAPIRequestBody requestBody); |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,272 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.presenter; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.autodebitV2.model.autodebitaccountlisting.AutoDebitAccount; |
|||
import com.gmeremit.online.gmeremittance_native.autodebitV2.model.autodebitaccountlisting.WebRequestModel; |
|||
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.datav2.ExchangeCalculationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.homeV2.model.UserInfoModelV2; |
|||
import com.gmeremit.online.gmeremittance_native.recipientV2.model.recipientlisting.RecipientInfoModel; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.gateway.ReSendMoneyV2Gateway; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.gateway.SendMoneyV2Gateway; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyAPIRequestBody; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyRequiredData; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionResponseBody; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.AmountDetailRelatedDataModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.BranchListApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.RecipientCurrencyModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.AccountValidationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.BankList; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.BranchList; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.PayoutMode; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.PayoutModeApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.verification.VerificationViewModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.presenter.SendMoneyV2InteractorInterface; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.presenter.SendMoneyV2PresenterInterface; |
|||
import com.gmeremit.online.gmeremittance_native.transactionpasspromt.PasswordPromptListener; |
|||
import com.gmeremit.online.gmeremittance_native.utils.Constants; |
|||
import com.gmeremit.online.gmeremittance_native.utils.Utils; |
|||
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
import io.reactivex.Observable; |
|||
import io.reactivex.android.schedulers.AndroidSchedulers; |
|||
import io.reactivex.disposables.CompositeDisposable; |
|||
import io.reactivex.schedulers.Schedulers; |
|||
|
|||
public class ReSendMoneyV2Presenter extends BasePresenter implements ReSendMoneyV2PresenterInterface, ReSendMoneyV2InteractorInterface { |
|||
|
|||
private final CompositeDisposable compositeObservable; |
|||
ReSendMoneyV2ContractInterface view; |
|||
ReSendMoneyV2GatewayInterface gateway; |
|||
|
|||
|
|||
|
|||
public ReSendMoneyV2Presenter(ReSendMoneyV2ContractInterface view) { |
|||
this.view = view; |
|||
this.gateway = new ReSendMoneyV2Gateway(this); |
|||
this.compositeObservable = new CompositeDisposable(); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public void clearPaymentData() { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public VerificationViewModel getVerificationRelatedData() { |
|||
// String fullName = this.selectedRecipient.getFirstName() + " " + this.selectedRecipient.getMiddleName() + " " + this.selectedRecipient.getLastName(); |
|||
// String address = this.selectedRecipient.getAddress(); |
|||
// String country = this.selectedRecipient.getCountry(); |
|||
// String mobile = this.selectedRecipient.getMobileNumber(); |
|||
// String pCountry = this.selectedRecipient.getCountry(); |
|||
// String pMode = this.selectedPaymentModeData.getMode(); |
|||
// String pAmount = this.selectedRecievingAmount + " " + selectedSendingCurrency; |
|||
// String exRate = this.selectedExRate; |
|||
// String serviceCharge = Utils.formatCurrency(this.selectedTransferFee) + " KRW"; |
|||
// |
|||
// String pAgent = null; |
|||
// if (selectedBranchData != null) |
|||
// pAgent = selectedBranchData.getName(); |
|||
// else if (selectedBankData != null) |
|||
// pAgent = selectedBankData.getName(); |
|||
|
|||
|
|||
// return new VerificationViewModel(fullName, address, country, mobile, pCountry, pMode, pAmount, exRate, serviceCharge, pAgent, this.selectedAccountNo); |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public void setSendingAmount(String sendingAmount, String recipientCurrencyCode, String selectedExRate, String recievingAmount, String transferFee, |
|||
boolean shouldCalcByRecipient, String forexId, String transferAmount) { |
|||
// this.selectedSendingAmount = sendingAmount; |
|||
// this.selectedSendingCurrency = recipientCurrencyCode; |
|||
// this.selectedExRate = selectedExRate; |
|||
// this.selectedRecievingAmount = recievingAmount; |
|||
// this.selectedTransferFee = transferFee; |
|||
// this.selectedCalcBy = shouldCalcByRecipient ? Constants.CALC_BY_RECIPEINT : Constants.CALC_BY_SENDER; |
|||
// this.selectedForexId = forexId; |
|||
// this.selectedTransferAmount = transferAmount; |
|||
} |
|||
|
|||
@Override |
|||
public void clearExRateData() { |
|||
// selectedSendingAmount = null; |
|||
// selectedExRate = null; |
|||
// selectedSendingCurrency = null; |
|||
// selectedRecievingAmount = null; |
|||
// selectedTransferAmount = null; |
|||
} |
|||
|
|||
@Override |
|||
public void promptPinAndPerformTransaction() { |
|||
view.promptPassword(new PasswordPromptListener() { |
|||
@Override |
|||
public void onPasswordSubmit(String password) { |
|||
performSendMoneyTransaction(password); |
|||
} |
|||
|
|||
@Override |
|||
public void onCancelled() { |
|||
|
|||
} |
|||
}); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public WebRequestModel getWebRequestDataForTermsAndCondition() { |
|||
return new WebRequestModel(getStringfromStringId(R.string.terms_and_condition_title_text), "https://online.gmeremit.com/Terms", null); |
|||
} |
|||
|
|||
@Override |
|||
public String getPaymentType() { |
|||
return null; |
|||
} |
|||
|
|||
|
|||
public void performSendMoneyTransaction(String password) { |
|||
|
|||
SendMoneyAPIRequestBody sendMoneyAPIRequestBody = new SendMoneyAPIRequestBody(); |
|||
|
|||
// sendMoneyAPIRequestBody.setUser(gateway.getUserID()); |
|||
// sendMoneyAPIRequestBody.setSenderId(gateway.getUserIDNumber()); |
|||
// |
|||
// sendMoneyAPIRequestBody.setReceiverId(selectedRecipient.getRecipientId()); |
|||
// |
|||
// sendMoneyAPIRequestBody.setDeliveryMethodId(selectedPaymentModeData.getId()); |
|||
// |
|||
// sendMoneyAPIRequestBody.setpAgent((selectedBankData != null) ? selectedBankData.getId() : ""); |
|||
// sendMoneyAPIRequestBody.setpBranch((selectedBankData != null && |
|||
// selectedBankData.getBranchRequired().equalsIgnoreCase(Constants.TRUE_STRING) |
|||
// && selectedBranchData != null) |
|||
// ? selectedBranchData.getBranchId() : ""); |
|||
// sendMoneyAPIRequestBody.setPayOutPartner(selectedPaymentModeData.getPayoutPartner()); |
|||
// sendMoneyAPIRequestBody.setPaymentType(selectedPaymentType.getType()); |
|||
// |
|||
// |
|||
// sendMoneyAPIRequestBody.setReceiverAccountNo(selectedAccountNo != null ? selectedAccountNo : ""); |
|||
// |
|||
// sendMoneyAPIRequestBody.setpCurr(selectedSendingCurrency); |
|||
// sendMoneyAPIRequestBody.setCollAmt(Utils.removeSpecialCharacterAndDecimalFromCurrency(selectedSendingAmount)); |
|||
// sendMoneyAPIRequestBody.setCollCurr("KRW"); |
|||
// sendMoneyAPIRequestBody.setPayoutAmt(selectedRecievingAmount); |
|||
// sendMoneyAPIRequestBody.setTransferAmt(selectedTransferAmount); |
|||
// sendMoneyAPIRequestBody.setServiceCharge(selectedTransferFee); |
|||
// sendMoneyAPIRequestBody.setDiscount(""); |
|||
// sendMoneyAPIRequestBody.setExRate(selectedExRate); |
|||
// sendMoneyAPIRequestBody.setCalBy(selectedCalcBy); |
|||
// sendMoneyAPIRequestBody.setTpExRate(selectedExRate); |
|||
// sendMoneyAPIRequestBody.setTpPCurr(selectedSendingCurrency); |
|||
// sendMoneyAPIRequestBody.setForeXSESSIONID(selectedForexId); |
|||
// |
|||
// sendMoneyAPIRequestBody.setPurposeOfRemittance(selectedRecipient.getReasonId()); |
|||
// sendMoneyAPIRequestBody.setSourceOfFund("128"); |
|||
// sendMoneyAPIRequestBody.setRelWithSender(selectedRecipient.getRelationId()); |
|||
// sendMoneyAPIRequestBody.setOccupation(""); |
|||
// sendMoneyAPIRequestBody.setIpAddress(""); |
|||
// sendMoneyAPIRequestBody.setrState(selectedRecipient.getState()); |
|||
// sendMoneyAPIRequestBody.setrLocation(selectedRecipient.getDistrictId()); |
|||
// sendMoneyAPIRequestBody.setIsAgreed(Constants.TRUE_STRING); |
|||
// |
|||
// //KFTC Related Params |
|||
// sendMoneyAPIRequestBody.setKftcAccountId(selectedPaymentType.getKftcAccountId()); |
|||
// |
|||
// sendMoneyAPIRequestBody.setTxnPassword(password); |
|||
|
|||
compositeObservable.add( |
|||
gateway.performSendMoneyTransaction(gateway.getAuth(), sendMoneyAPIRequestBody) |
|||
.subscribeOn(Schedulers.io()) |
|||
.doOnSubscribe(d -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text))) |
|||
.doFinally(() -> view.showProgressBar(false, "")) |
|||
.observeOn(AndroidSchedulers.mainThread()) |
|||
.subscribeWith(new SendMoneyTransactionObserver()) |
|||
); |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
@Override |
|||
public void onViewDestroyed() { |
|||
super.onViewDestroyed(); |
|||
if (compositeObservable != null && !compositeObservable.isDisposed()) { |
|||
compositeObservable.dispose(); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public Observable<ExchangeCalculationApiResponse> getForex(String recieveAmount, String senderAmount, boolean shouldCaulatedByRecipient, String recieverCurrency) { |
|||
|
|||
// String senderCountryId = gateway.getUserCountryId(); |
|||
// String senderCurrency = gateway.getUserPreferredCurrency(); |
|||
// String paymentMethodId = selectedPaymentModeData.getId(); |
|||
// String calculationPreference = shouldCaulatedByRecipient ? Constants.CALC_BY_RECIPEINT : Constants.CALC_BY_SENDER; |
|||
// String recipientCountryName = selectedRecipient.getCountry(); |
|||
// String recipientCountryID = selectedRecipient.getCountryId(); |
|||
// String bankId = (selectedBankData == null) ? "" : selectedBankData.getId(); |
|||
// String paymentPartnerId = selectedPaymentModeData.getPayoutPartner(); |
|||
// |
|||
// |
|||
// return gateway.sendDataForForexCalculation(gateway.getAuth(), senderCountryId, |
|||
// senderCurrency, recieverCurrency, senderAmount, |
|||
// recieveAmount, paymentMethodId, calculationPreference, recipientCountryName, |
|||
// recipientCountryID, bankId, paymentPartnerId, gateway.getUserID(), selectedPaymentType.getType()) |
|||
// .subscribeOn(Schedulers.io()) |
|||
// .observeOn(AndroidSchedulers.mainThread()); |
|||
|
|||
return null; |
|||
} |
|||
|
|||
|
|||
|
|||
public class SendMoneyTransactionObserver extends GenericApiObserverResponse<SendMoneyTransactionResponseBody> { |
|||
|
|||
@Override |
|||
protected void onSuccess(SendMoneyTransactionResponseBody sendMoneyResponse) { |
|||
if (sendMoneyResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|||
UserInfoModelV2 userInfoModelV2 = new UserInfoModelV2(); |
|||
userInfoModelV2.setAvailableBalance(sendMoneyResponse.getExtra()); |
|||
userInfoModelV2.setYearlyLimit(sendMoneyResponse.getExtra2()); |
|||
gateway.updateUserInfoInBatch(userInfoModelV2); |
|||
view.showPopUpMessage(sendMoneyResponse.getMsg(), CustomAlertDialog.AlertType.SUCCESS, new CustomAlertDialog.CustomDialogActionListener() { |
|||
|
|||
@Override |
|||
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|||
|
|||
view.showReceiptOnTransactionComplete(sendMoneyResponse.getId()); |
|||
} |
|||
}); |
|||
} else { |
|||
view.showPopUpMessage(sendMoneyResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void onFailed(String message) { |
|||
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|||
} |
|||
|
|||
@Override |
|||
protected void onConnectionNotEstablished(String message) { |
|||
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|||
} |
|||
|
|||
@Override |
|||
protected void unauthorizedAccess(String message) { |
|||
gateway.clearAllUserData(); |
|||
|
|||
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT,alertType -> view.logout()); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.presenter; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.autodebitV2.model.autodebitaccountlisting.WebRequestModel; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface; |
|||
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.datav2.ExchangeCalculationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.AmountDetailRelatedDataModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.BranchListApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.AccountValidationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.BankList; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.BranchList; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.PayoutMode; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.payoutmode.PayoutModeApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.verification.VerificationViewModel; |
|||
import com.gmeremit.online.gmeremittance_native.transactionpasspromt.PasswordPromptListener; |
|||
|
|||
import io.reactivex.Observable; |
|||
|
|||
|
|||
public interface ReSendMoneyV2PresenterInterface extends BasePresenterInterface { |
|||
|
|||
|
|||
Observable<ExchangeCalculationApiResponse> getForex(String recieveAmount, String sendMoneyEditTextText, boolean shouldCaulatedByRecipient,String recieverCurrency); |
|||
|
|||
|
|||
void clearPaymentData(); |
|||
|
|||
|
|||
VerificationViewModel getVerificationRelatedData(); |
|||
|
|||
void setSendingAmount(String sendingAmount, String recipientCurrencyCode, String selectedExRate, String recievingAmount, String transferFee, boolean calcBy, String forexId,String transferAmount); |
|||
|
|||
void clearExRateData(); |
|||
|
|||
void promptPinAndPerformTransaction(); |
|||
|
|||
WebRequestModel getWebRequestDataForTermsAndCondition(); |
|||
|
|||
String getPaymentType(); |
|||
|
|||
interface ReSendMoneyV2ContractInterface extends BaseContractInterface |
|||
{ |
|||
void promptPassword(PasswordPromptListener listener); |
|||
|
|||
void showReceiptOnTransactionComplete(String transactionId); |
|||
|
|||
} |
|||
} |
@ -0,0 +1,175 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.view; |
|||
|
|||
import android.content.Intent; |
|||
import android.support.annotation.LayoutRes; |
|||
import android.support.v4.app.FragmentTransaction; |
|||
import android.support.v7.app.AppCompatActivity; |
|||
import android.os.Bundle; |
|||
import android.view.View; |
|||
import android.widget.TextView; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseActivity; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseFragment; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.ReSendMoneyActionListener; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.ReSendMoneyScreenManager; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.presenter.ReSendMoneyV2Presenter; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.presenter.ReSendMoneyV2PresenterInterface; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.SendMoneyScreenManager; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.SendMoneyV2TransactionCompleteActivity; |
|||
import com.gmeremit.online.gmeremittance_native.transactionpasspromt.PasswordPromptListener; |
|||
import com.gmeremit.online.gmeremittance_native.transactionpasspromt.TransactionPasswordPromptActivity; |
|||
|
|||
import butterknife.BindView; |
|||
import butterknife.ButterKnife; |
|||
|
|||
import static com.gmeremit.online.gmeremittance_native.transactionpasspromt.TransactionPasswordPromptActivity.PAYMENT_TYPE_BUNDLE_KEY; |
|||
|
|||
public class ReSendMoneyV2Activity extends BaseActivity implements ReSendMoneyV2PresenterInterface.ReSendMoneyV2ContractInterface, ReSendMoneyActionListener, View.OnClickListener { |
|||
|
|||
private static final int PASSWORD_PROMPT_REQUEST = 43278; |
|||
public static String RESEND_DATA = "resendData"; |
|||
private Object reSendMoneyRequiredData; |
|||
private android.support.v4.app.FragmentManager fragmentManager; |
|||
private ReSendMoneyV2PresenterInterface presenter; |
|||
private PasswordPromptListener passwordPromptListener; |
|||
|
|||
@BindView(R.id.toolbar_title) |
|||
TextView toolbar_title; |
|||
|
|||
@BindView(R.id.iv_back) |
|||
View iv_back; |
|||
|
|||
@BindView(R.id.iv_cancel) |
|||
View iv_cancel; |
|||
|
|||
@Override |
|||
protected void onCreate(Bundle savedInstanceState) { |
|||
super.onCreate(savedInstanceState); |
|||
setContentView(R.layout.activity_re_send_money_v2); |
|||
ButterKnife.bind(this); |
|||
fragmentManager = getSupportFragmentManager(); |
|||
initialize(); |
|||
performDefaultAction(savedInstanceState); |
|||
} |
|||
|
|||
private void performDefaultAction(Bundle savedInstanceState) { |
|||
if (savedInstanceState == null) { |
|||
try { |
|||
reSendMoneyRequiredData = getIntent().getExtras().getParcelable("SOME KEY NAME"); |
|||
|
|||
} catch (Exception e) { |
|||
reSendMoneyRequiredData = null; |
|||
} |
|||
} else { |
|||
reSendMoneyRequiredData = savedInstanceState.getParcelable(RESEND_DATA); |
|||
} |
|||
|
|||
addScreenToSendMoneyOnly(R.layout.fragment_amount_detail_resend_money_v2, false); |
|||
|
|||
} |
|||
|
|||
|
|||
public boolean addScreenToSendMoney(@LayoutRes int layoutID, boolean addTransitionEffect) { |
|||
BaseFragment baseFragment = ReSendMoneyScreenManager.getReSendMoneyScreenFromId(layoutID); |
|||
if (baseFragment != null) { |
|||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); |
|||
if (addTransitionEffect) |
|||
fragmentTransaction.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_right, R.anim |
|||
.exit_to_left); |
|||
fragmentTransaction.add(R.id.sendMoneyViewContainer, baseFragment, baseFragment.toString()); |
|||
fragmentTransaction.addToBackStack(layoutID + ""); |
|||
fragmentTransaction.commit(); |
|||
return true; |
|||
} else |
|||
return false; |
|||
} |
|||
|
|||
public boolean addScreenToSendMoneyOnly(@LayoutRes int layoutID, boolean addTransitionEffect) { |
|||
BaseFragment baseFragment = ReSendMoneyScreenManager.getReSendMoneyScreenFromId(layoutID); |
|||
if (baseFragment != null) { |
|||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); |
|||
if (addTransitionEffect) |
|||
fragmentTransaction.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_right, R.anim |
|||
.exit_to_left); |
|||
fragmentTransaction.add(R.id.sendMoneyViewContainer, baseFragment, baseFragment.toString()); |
|||
fragmentTransaction.commit(); |
|||
return true; |
|||
} else |
|||
return false; |
|||
} |
|||
|
|||
private void initialize() { |
|||
toolbar_title.setText(getString(R.string.resend_money_text)); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
protected void onStart() { |
|||
super.onStart(); |
|||
iv_back.setOnClickListener(this); |
|||
iv_cancel.setOnClickListener(this); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
protected void onStop() { |
|||
super.onStop(); |
|||
iv_back.setOnClickListener(null); |
|||
iv_cancel.setOnClickListener(null); |
|||
} |
|||
|
|||
@Override |
|||
public void onClick(View v) { |
|||
switch (v.getId()) { |
|||
case R.id.iv_back: |
|||
onBackPressed(); |
|||
break; |
|||
|
|||
case R.id.iv_cancel: |
|||
finish(); |
|||
break; |
|||
|
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void onBackPressed() { |
|||
hideKeyBoard(); |
|||
super.onBackPressed(); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public void showTransactionReviewPage() { |
|||
addScreenToSendMoney(R.layout.fragment_verification_resend_money_v2, true); |
|||
} |
|||
|
|||
@Override |
|||
public ReSendMoneyV2PresenterInterface getPresenter() { |
|||
if (this.presenter == null) |
|||
this.presenter = new ReSendMoneyV2Presenter(this); |
|||
return this.presenter; |
|||
} |
|||
|
|||
@Override |
|||
public void promptPassword(PasswordPromptListener listener) { |
|||
String paymentType=presenter.getPaymentType(); |
|||
this.passwordPromptListener=listener; |
|||
Intent passwordRequestIntent=new Intent(this, TransactionPasswordPromptActivity.class); |
|||
passwordRequestIntent.putExtra(PAYMENT_TYPE_BUNDLE_KEY,""); |
|||
startActivityForResult(passwordRequestIntent,PASSWORD_PROMPT_REQUEST); |
|||
} |
|||
|
|||
@Override |
|||
public void showReceiptOnTransactionComplete(String transactionId) { |
|||
Intent startReceiptActivity = new Intent(this, SendMoneyV2TransactionCompleteActivity.class); |
|||
startReceiptActivity.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
|||
startReceiptActivity.putExtra(SendMoneyV2TransactionCompleteActivity.SEND_MONEY_TID_BUNDLE_KEY, transactionId); |
|||
startReceiptActivity.putExtra(SendMoneyV2TransactionCompleteActivity.IS_TRANSACTION_DETAIL_REQUEST_FROM_SEND_MONEY_BUNDLE_KEY, true); |
|||
startReceiptActivity.putExtra(SendMoneyV2TransactionCompleteActivity.SHOULD_UPDATE_BALANCE_UPON_RETURN, true); |
|||
startActivity(startReceiptActivity); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,519 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.view.amountdetail; |
|||
|
|||
import android.app.Activity; |
|||
import android.content.Context; |
|||
import android.os.Bundle; |
|||
import android.os.Handler; |
|||
import android.support.annotation.Nullable; |
|||
import android.support.v4.view.ViewCompat; |
|||
import android.text.Editable; |
|||
import android.text.TextWatcher; |
|||
import android.view.KeyEvent; |
|||
import android.view.LayoutInflater; |
|||
import android.view.View; |
|||
import android.view.ViewGroup; |
|||
import android.view.animation.AccelerateDecelerateInterpolator; |
|||
import android.view.animation.Interpolator; |
|||
import android.view.inputmethod.EditorInfo; |
|||
import android.widget.Button; |
|||
import android.widget.EditText; |
|||
import android.widget.ImageView; |
|||
import android.widget.TextView; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.GmeApplication; |
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseFragment; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.CurrencyFormatterTextWatcher; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.exchangecountrylistingdialog.CountryFlagMapper; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.datav2.ExchangeCalculationApiResponse; |
|||
import com.gmeremit.online.gmeremittance_native.exchange_rate.model.datav2.ExchangeCalculationModel; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.ReSendMoneyActionListener; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.AmountDetailRelatedDataModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.amountdetail.RecipientCurrencyModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.SendMoneyActionListener; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.amountdetail.AmountDetailExRateCountryListingDialog; |
|||
import com.gmeremit.online.gmeremittance_native.utils.Constants; |
|||
import com.gmeremit.online.gmeremittance_native.utils.Utils; |
|||
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse; |
|||
|
|||
import butterknife.BindView; |
|||
import butterknife.ButterKnife; |
|||
import io.reactivex.disposables.CompositeDisposable; |
|||
|
|||
public class ResendMoneyAmountDetailFragment extends BaseFragment implements View.OnClickListener, TextView.OnEditorActionListener { |
|||
|
|||
@BindView(R.id.amountDetailContinueButton) |
|||
Button continueBtn; |
|||
|
|||
@BindView(R.id.sendAmountEdTxt) |
|||
EditText sendMoneyEditText; |
|||
|
|||
@BindView(R.id.receiveAmountEdTxt) |
|||
EditText recieveMoneyEditText; |
|||
|
|||
@BindView(R.id.transferFeeTxtView) |
|||
TextView transferFeeTxtView; |
|||
|
|||
@BindView(R.id.exchangeRateTxtView) |
|||
TextView exchangeRateTxtView; |
|||
|
|||
@BindView(R.id.recepientCurrencyTextView) |
|||
TextView recepientCurrencyTextView; |
|||
|
|||
|
|||
@BindView(R.id.countrySelectionSpinner) |
|||
ViewGroup countrySelectionSpinner; |
|||
|
|||
@BindView(R.id.recepientFlagImageView) |
|||
ImageView recepientFlagImageView; |
|||
|
|||
@BindView(R.id.rootView) |
|||
ViewGroup rootView; |
|||
|
|||
private boolean shouldCaulatedByRecipient; |
|||
private boolean shouldCalculateExRate = true; |
|||
|
|||
CompositeDisposable compositeDisposable = null; |
|||
|
|||
|
|||
private Interpolator interpolator; |
|||
|
|||
private AmountDetailRelatedDataModel amountDetailRelatedData; |
|||
|
|||
private String selectedTransferFeeAmount; |
|||
private String selectedExRate; |
|||
private String selectedRecipientAmount; |
|||
private String selectedSendAmount; |
|||
private String selectedsendingCurrency; |
|||
private SendAmountTextWatcher sendAmountTextWatcher; |
|||
private RecipientAmountTextWatcher recepientAmountTextWatcher; |
|||
private CurrencyFormatterTextWatcher sendCurrencyFormatterTextWatcher; |
|||
private CurrencyFormatterTextWatcher recepientCurrencyFormatterTextWatcher; |
|||
private String selectedExRateId; |
|||
private String selectedExRateWithoutTrunc; |
|||
private String selectedTransferAmount; |
|||
|
|||
|
|||
@Override |
|||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
|||
return inflater.inflate(R.layout.fragment_amount_detail_resend_money_v2, container, false); |
|||
} |
|||
|
|||
@Override |
|||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { |
|||
super.onViewCreated(view, savedInstanceState); |
|||
ButterKnife.bind(this, view); |
|||
init(); |
|||
performDefaultAction(savedInstanceState); |
|||
} |
|||
|
|||
private void init() { |
|||
this.sendAmountTextWatcher = new SendAmountTextWatcher(); |
|||
this.recepientAmountTextWatcher = new RecipientAmountTextWatcher(); |
|||
compositeDisposable = new CompositeDisposable(); |
|||
interpolator = new AccelerateDecelerateInterpolator(); |
|||
registerTextWatchers(true); |
|||
|
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void onStart() { |
|||
super.onStart(); |
|||
continueBtn.setOnClickListener(this); |
|||
recieveMoneyEditText.setOnEditorActionListener(this); |
|||
sendMoneyEditText.setOnEditorActionListener(this); |
|||
countrySelectionSpinner.setOnClickListener(this); |
|||
// rootView.setOnTouchListener((v, event) -> focusOutAndHideKeyboard()); |
|||
} |
|||
|
|||
@Override |
|||
public void onStop() { |
|||
super.onStop(); |
|||
continueBtn.setOnClickListener(null); |
|||
recieveMoneyEditText.setOnEditorActionListener(null); |
|||
sendMoneyEditText.setOnEditorActionListener(null); |
|||
countrySelectionSpinner.setOnClickListener(null); |
|||
// rootView.setOnTouchListener(null); |
|||
|
|||
} |
|||
|
|||
// @Override |
|||
// public void onAttach(Context context) { |
|||
// super.onAttach(context); |
|||
// ((ReSendMoneyActionListener) context).updateCurrentIndexFrom(R.layout.fragment_amount_detail_send_money_v2); |
|||
// } |
|||
// |
|||
// @Override |
|||
// public void onAttach(Activity activity) { |
|||
// super.onAttach(activity); |
|||
// ((ReSendMoneyActionListener) activity).updateCurrentIndexFrom(R.layout.fragment_amount_detail_send_money_v2); |
|||
// |
|||
// } |
|||
// |
|||
// @Override |
|||
// public void onDetach() { |
|||
// super.onDetach(); |
|||
// ((ReSendMoneyActionListener) getActivity()).updateCurrentScreenByLayoutId(R.layout.fragment_amount_detail_send_money_v2); |
|||
// |
|||
// } |
|||
|
|||
@Override |
|||
public void onDestroy() { |
|||
((ReSendMoneyActionListener) getActivity()).getPresenter().clearExRateData(); |
|||
registerTextWatchers(false); |
|||
super.onDestroy(); |
|||
if (compositeDisposable != null && !compositeDisposable.isDisposed()) |
|||
compositeDisposable.dispose(); |
|||
} |
|||
|
|||
|
|||
|
|||
private void performDefaultAction(Bundle savedInstance) { |
|||
shouldCaulatedByRecipient = false; |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
private boolean focusOutAndHideKeyboard() { |
|||
if(sendMoneyEditText.hasFocus()||recieveMoneyEditText.hasFocus()) |
|||
{ |
|||
|
|||
View currentViewWithFocus=rootView.getFocusedChild(); |
|||
if(currentViewWithFocus!=null) |
|||
currentViewWithFocus.clearFocus(); |
|||
|
|||
hideKeyBoard(); |
|||
return true; |
|||
|
|||
} |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public void onClick(View v) { |
|||
switch (v.getId()) { |
|||
case R.id.amountDetailContinueButton: |
|||
|
|||
|
|||
if (shouldCalculateExRate) { |
|||
getForex(); |
|||
} else { |
|||
if (validateAll()) { |
|||
sendMoneyEditText.clearFocus(); |
|||
recieveMoneyEditText.clearFocus(); |
|||
hideKeyBoard(); |
|||
((ReSendMoneyActionListener) getActivity()).getPresenter().setSendingAmount(sendMoneyEditText.getText().toString(), amountDetailRelatedData.getDefaultSelectedCurrency().getCurrencyCode(), selectedExRateWithoutTrunc, selectedRecipientAmount, selectedTransferFeeAmount, shouldCaulatedByRecipient, selectedExRateId,selectedTransferAmount); |
|||
((ReSendMoneyActionListener) getActivity()).showTransactionReviewPage(); |
|||
} |
|||
|
|||
} |
|||
break; |
|||
} |
|||
} |
|||
|
|||
|
|||
private void getForex() { |
|||
if (shouldCaulatedByRecipient && !validateAmountIsNotEmpty(recieveMoneyEditText.getText().toString())) { |
|||
showToastMessage(getString(R.string.sending_amount_error)); |
|||
return; |
|||
} |
|||
if (!shouldCaulatedByRecipient && !validateAmountIsNotEmpty(sendMoneyEditText.getText().toString())) { |
|||
showToastMessage(getString(R.string.receiving_amount_error)); |
|||
return; |
|||
} |
|||
compositeDisposable.add( |
|||
((ReSendMoneyActionListener) getActivity()).getPresenter().getForex( |
|||
recieveMoneyEditText.getText().toString(), sendMoneyEditText.getText().toString(), shouldCaulatedByRecipient, amountDetailRelatedData.getDefaultSelectedCurrency().getCurrencyCode() |
|||
).doOnSubscribe(d -> showProgressBar(true, getString(R.string.processing_request_text))) |
|||
.subscribeWith(new ExchangeRateCalcObserver()) |
|||
); |
|||
} |
|||
|
|||
private void showSelectedCurrency(String selectedCountryCode, String selectedCountryCurrency) { |
|||
int flagResId = -1; |
|||
if (selectedCountryCode != null) |
|||
flagResId = CountryFlagMapper.getFlagFromCountryCode(selectedCountryCode); |
|||
if (flagResId != -1) |
|||
this.recepientFlagImageView.setBackgroundResource(flagResId); |
|||
else |
|||
this.recepientFlagImageView.setBackgroundResource(0); |
|||
|
|||
if (selectedCountryCurrency != null) |
|||
this.recepientCurrencyTextView.setText(selectedCountryCurrency); |
|||
} |
|||
|
|||
private void showTransferfeeAndExRate(boolean action, String transferDisplay, String exRateDisplay) { |
|||
|
|||
if (action) { |
|||
|
|||
if (this.exchangeRateTxtView.getVisibility() == View.VISIBLE) |
|||
this.exchangeRateTxtView.setVisibility(View.INVISIBLE); |
|||
this.exchangeRateTxtView.setText(exRateDisplay); |
|||
this.exchangeRateTxtView.setTranslationY(this.exchangeRateTxtView.getHeight()); |
|||
this.exchangeRateTxtView.setVisibility(View.VISIBLE); |
|||
ViewCompat.animate(this.exchangeRateTxtView).translationY(0).setDuration(550).setInterpolator(this.interpolator).start(); |
|||
|
|||
|
|||
if (this.transferFeeTxtView.getVisibility() == View.VISIBLE) |
|||
this.transferFeeTxtView.setVisibility(View.INVISIBLE); |
|||
this.transferFeeTxtView.setText(transferDisplay); |
|||
this.transferFeeTxtView.setTranslationY(this.transferFeeTxtView.getHeight()); |
|||
this.transferFeeTxtView.setVisibility(View.VISIBLE); |
|||
ViewCompat.animate(this.transferFeeTxtView).translationY(0).setDuration(550).setInterpolator(this.interpolator).start(); |
|||
|
|||
} else { |
|||
if (exchangeRateTxtView.getVisibility() == View.VISIBLE) |
|||
this.exchangeRateTxtView.setVisibility(View.INVISIBLE); |
|||
|
|||
if (transferFeeTxtView.getVisibility() == View.VISIBLE) { |
|||
this.transferFeeTxtView.setVisibility(View.INVISIBLE); |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
private void showSendAndRecieveAmount(String sendAmount, String recieveAmount) { |
|||
updateSendAmount(sendAmount); |
|||
updateRecievingAmount(recieveAmount); |
|||
} |
|||
|
|||
private boolean validateAmountIsNotEmpty(String amount) { |
|||
return amount != null && amount.length() > 0; |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { |
|||
switch (v.getId()) { |
|||
case R.id.sendAmountEdTxt: |
|||
if (actionId == EditorInfo.IME_ACTION_DONE) { |
|||
hideKeyBoard(); |
|||
getForex(); |
|||
} |
|||
return true; |
|||
|
|||
case R.id.receiveAmountEdTxt: |
|||
if (actionId == EditorInfo.IME_ACTION_DONE) { |
|||
hideKeyBoard(); |
|||
getForex(); |
|||
} |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
public class ExchangeRateCalcObserver extends GenericApiObserverResponse<ExchangeCalculationApiResponse> { |
|||
|
|||
@Override |
|||
protected void onSuccess(ExchangeCalculationApiResponse exchangeCalculationApiResponse) { |
|||
if (isUIReady()) { |
|||
showProgressBar(false, ""); |
|||
if (exchangeCalculationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|||
ExchangeCalculationModel data = exchangeCalculationApiResponse.getData(); |
|||
selectedTransferFeeAmount = data.getScCharge(); |
|||
selectedExRate = data.getExRateDisplay(); |
|||
selectedExRateWithoutTrunc = data.getExRate(); |
|||
selectedRecipientAmount = data.getpAmt(); |
|||
selectedSendAmount = data.getCollAmt(); |
|||
selectedsendingCurrency = data.getCollCurr(); |
|||
selectedExRateId = data.getExrateId(); |
|||
selectedTransferAmount=data.getsAmt(); |
|||
|
|||
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); |
|||
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount); |
|||
updateButtonToCalculate(false); |
|||
|
|||
} else |
|||
showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|||
} |
|||
else |
|||
{ |
|||
scheduleTaskLater(()->{ |
|||
showProgressBar(false, ""); |
|||
if (exchangeCalculationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|||
ExchangeCalculationModel data = exchangeCalculationApiResponse.getData(); |
|||
selectedTransferFeeAmount = data.getScCharge(); |
|||
selectedExRate = data.getExRateDisplay(); |
|||
selectedExRateWithoutTrunc = data.getExRate(); |
|||
selectedRecipientAmount = data.getpAmt(); |
|||
selectedSendAmount = data.getCollAmt(); |
|||
selectedsendingCurrency = data.getCollCurr(); |
|||
selectedExRateId = data.getExrateId(); |
|||
selectedTransferAmount=data.getsAmt(); |
|||
|
|||
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); |
|||
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount); |
|||
updateButtonToCalculate(false); |
|||
|
|||
} else |
|||
showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|||
|
|||
}); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void onFailed(String message) { |
|||
if(isUIReady()) { |
|||
showProgressBar(false, ""); |
|||
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|||
} |
|||
else |
|||
{ |
|||
scheduleTaskLater(()->{ |
|||
showProgressBar(false, ""); |
|||
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
protected void onConnectionNotEstablished(String message) { |
|||
if(isUIReady()) { |
|||
showProgressBar(false, ""); |
|||
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|||
} |
|||
else |
|||
{ |
|||
scheduleTaskLater(()->{ |
|||
showProgressBar(false, ""); |
|||
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
protected void unauthorizedAccess(String message) { |
|||
GmeApplication.getStorage().edit().clear().commit(); |
|||
showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT,alertType -> logout()); |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
private boolean validateAll() { |
|||
return validateAmountIsNotEmpty(sendMoneyEditText.getText().toString())&&validateAmountIsNotEmpty(recieveMoneyEditText.getText().toString()); |
|||
} |
|||
|
|||
|
|||
|
|||
private void updateButtonToCalculate(boolean action) { |
|||
shouldCalculateExRate = action; |
|||
if (action) |
|||
continueBtn.setText(getString(R.string.calculate_text)); |
|||
else |
|||
continueBtn.setText(getString(R.string.continue_text)); |
|||
} |
|||
|
|||
private void updateSendAmount(String amount) { |
|||
registerAvailableTextWatchersForEditText(sendMoneyEditText, false); |
|||
sendMoneyEditText.setText(Utils.formatCurrency(amount)); |
|||
registerAvailableTextWatchersForEditText(sendMoneyEditText, true); |
|||
} |
|||
|
|||
private void updateRecievingAmount(String amount) { |
|||
registerAvailableTextWatchersForEditText(recieveMoneyEditText, false); |
|||
recieveMoneyEditText.setText(Utils.formatCurrency(amount)); |
|||
registerAvailableTextWatchersForEditText(recieveMoneyEditText, true); |
|||
} |
|||
|
|||
private void registerTextWatchers(boolean action) { |
|||
if (action) { |
|||
if (sendAmountTextWatcher == null) |
|||
sendAmountTextWatcher = new SendAmountTextWatcher(); |
|||
if (recepientAmountTextWatcher == null) |
|||
recepientAmountTextWatcher = new RecipientAmountTextWatcher(); |
|||
|
|||
if (recepientCurrencyFormatterTextWatcher == null) |
|||
recepientCurrencyFormatterTextWatcher = new CurrencyFormatterTextWatcher(recieveMoneyEditText); |
|||
if (sendCurrencyFormatterTextWatcher == null) |
|||
sendCurrencyFormatterTextWatcher = new CurrencyFormatterTextWatcher(sendMoneyEditText); |
|||
|
|||
|
|||
sendMoneyEditText.addTextChangedListener(sendAmountTextWatcher); |
|||
recieveMoneyEditText.addTextChangedListener(recepientAmountTextWatcher); |
|||
|
|||
sendMoneyEditText.addTextChangedListener(sendCurrencyFormatterTextWatcher); |
|||
recieveMoneyEditText.addTextChangedListener(recepientCurrencyFormatterTextWatcher); |
|||
} else { |
|||
sendMoneyEditText.removeTextChangedListener(sendAmountTextWatcher); |
|||
recieveMoneyEditText.removeTextChangedListener(recepientAmountTextWatcher); |
|||
|
|||
sendMoneyEditText.removeTextChangedListener(sendCurrencyFormatterTextWatcher); |
|||
recieveMoneyEditText.removeTextChangedListener(recepientCurrencyFormatterTextWatcher); |
|||
} |
|||
} |
|||
|
|||
private void registerAvailableTextWatchersForEditText(EditText editText, boolean action) { |
|||
switch (editText.getId()) { |
|||
case R.id.sendAmountEdTxt: |
|||
if (action) |
|||
sendMoneyEditText.addTextChangedListener(sendAmountTextWatcher); |
|||
else |
|||
sendMoneyEditText.removeTextChangedListener(sendAmountTextWatcher); |
|||
break; |
|||
case R.id.receiveAmountEdTxt: |
|||
if (action) |
|||
recieveMoneyEditText.addTextChangedListener(recepientAmountTextWatcher); |
|||
else |
|||
recieveMoneyEditText.removeTextChangedListener(recepientAmountTextWatcher); |
|||
break; |
|||
} |
|||
} |
|||
|
|||
|
|||
private class SendAmountTextWatcher implements TextWatcher { |
|||
|
|||
@Override |
|||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void onTextChanged(CharSequence s, int start, int before, int count) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void afterTextChanged(Editable s) { |
|||
shouldCaulatedByRecipient = false; |
|||
updateRecievingAmount(""); |
|||
updateButtonToCalculate(true); |
|||
showTransferfeeAndExRate(false, "", ""); |
|||
} |
|||
} |
|||
|
|||
private class RecipientAmountTextWatcher implements TextWatcher { |
|||
|
|||
@Override |
|||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void onTextChanged(CharSequence s, int start, int before, int count) { |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void afterTextChanged(Editable s) { |
|||
shouldCaulatedByRecipient = true; |
|||
updateSendAmount(""); |
|||
updateButtonToCalculate(true); |
|||
showTransferfeeAndExRate(false, "", ""); |
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,195 @@ |
|||
package com.gmeremit.online.gmeremittance_native.resendV2.view.verification; |
|||
|
|||
import android.app.Activity; |
|||
import android.content.Context; |
|||
import android.content.Intent; |
|||
import android.net.Uri; |
|||
import android.os.Bundle; |
|||
import android.support.annotation.Nullable; |
|||
import android.view.LayoutInflater; |
|||
import android.view.View; |
|||
import android.view.ViewGroup; |
|||
import android.widget.Button; |
|||
import android.widget.TextView; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.autodebitV2.model.autodebitaccountlisting.WebRequestModel; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseFragment; |
|||
import com.gmeremit.online.gmeremittance_native.resendV2.ReSendMoneyActionListener; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.verification.VerificationViewModel; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.SendMoneyV2Activity; |
|||
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.view.verification.TermsAndConditionV2BrowserActivity; |
|||
|
|||
import butterknife.BindView; |
|||
import butterknife.ButterKnife; |
|||
|
|||
import static com.gmeremit.online.gmeremittance_native.webbrowserV2.WebBrowserV2Activity.WEB_BROWSWER_URL_BUNDLE_KEY; |
|||
|
|||
public class ResendVerificationDetailFragment extends BaseFragment implements View.OnClickListener { |
|||
|
|||
@BindView(R.id.txt_firstName) |
|||
TextView txt_firstName; |
|||
@BindView(R.id.txt_address) |
|||
TextView txt_address; |
|||
@BindView(R.id.txt_country) |
|||
TextView txt_country ; |
|||
@BindView(R.id.txt_mobile) |
|||
TextView txt_mobile ; |
|||
@BindView(R.id.txt_pcountry) |
|||
TextView txt_pcountry ; |
|||
@BindView(R.id.txt_pmode) |
|||
TextView txt_pmode; |
|||
@BindView(R.id.txt_pamount) |
|||
TextView txt_pamount ; |
|||
@BindView(R.id.txt_exrate) |
|||
TextView txt_exrate ; |
|||
@BindView(R.id.txt_servicechargeAmount) |
|||
TextView txt_servicechargeAmount ; |
|||
@BindView(R.id.txt_pagent) |
|||
TextView txt_pagent ; |
|||
@BindView(R.id.pAgentContainerView) |
|||
ViewGroup pAgentContainerView ; |
|||
@BindView(R.id.bankAcNoContainer) |
|||
View bankAcNoContainer ; |
|||
|
|||
@BindView(R.id.txt_bankAcNo) |
|||
TextView txt_bankAcNo ; |
|||
|
|||
@BindView(R.id.txt_user_aggreement) |
|||
TextView txt_user_aggreement; |
|||
|
|||
@BindView(R.id.exRateCalculateButton) |
|||
Button sendTransactionButton; |
|||
|
|||
|
|||
@Override |
|||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
|||
return inflater.inflate(R.layout.fragment_verification_resend_money_v2, container, false); |
|||
} |
|||
|
|||
@Override |
|||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { |
|||
super.onViewCreated(view, savedInstanceState); |
|||
ButterKnife.bind(this, view); |
|||
init(); |
|||
performDefaultAction(savedInstanceState); |
|||
} |
|||
|
|||
private void init() { |
|||
|
|||
setupRecyclerView(); |
|||
|
|||
} |
|||
|
|||
private void setupRecyclerView() { |
|||
|
|||
} |
|||
|
|||
// @Override |
|||
// public void onAttach(Context context) { |
|||
// super.onAttach(context); |
|||
// ((SendMoneyActionListener)context).updateCurrentIndexFrom(R.layout.fragment_verification_send_money_v2); |
|||
// } |
|||
// |
|||
// @Override |
|||
// public void onAttach(Activity activity) { |
|||
// super.onAttach(activity); |
|||
// ((SendMoneyActionListener)activity).updateCurrentIndexFrom(R.layout.fragment_verification_send_money_v2); |
|||
// |
|||
// } |
|||
// |
|||
// @Override |
|||
// public void onDetach() { |
|||
// super.onDetach(); |
|||
// ((SendMoneyActionListener) getActivity()).updateCurrentScreenByLayoutId(R.layout.fragment_verification_send_money_v2); |
|||
// } |
|||
|
|||
@Override |
|||
public void onStart() { |
|||
super.onStart(); |
|||
sendTransactionButton.setOnClickListener(this); |
|||
txt_user_aggreement.setOnClickListener(this); |
|||
} |
|||
|
|||
@Override |
|||
public void onStop() { |
|||
super.onStop(); |
|||
sendTransactionButton.setOnClickListener(null); |
|||
txt_user_aggreement.setOnClickListener(null); |
|||
|
|||
} |
|||
|
|||
@Override |
|||
public void onDestroy() { |
|||
super.onDestroy(); |
|||
((SendMoneyV2Activity) getActivity()).updateFinalTranstionToDefault(); |
|||
} |
|||
|
|||
private void performDefaultAction(Bundle savedInstance) { |
|||
|
|||
VerificationViewModel verificationViewModel= ((ReSendMoneyActionListener)getActivity()).getPresenter().getVerificationRelatedData(); |
|||
txt_address.setText(" : "+verificationViewModel.getAddress()); |
|||
txt_country.setText(" : "+verificationViewModel.getCountry()); |
|||
txt_exrate.setText(" : "+verificationViewModel.getExRate()); |
|||
txt_firstName.setText(" : "+verificationViewModel.getFirstName()); |
|||
txt_mobile.setText(" : "+verificationViewModel.getMobile()); |
|||
txt_pamount.setText(" : "+verificationViewModel.getpAmount()); |
|||
txt_pcountry.setText(" : "+verificationViewModel.getpCountry()); |
|||
txt_pmode.setText(" : "+verificationViewModel.getpMode()); |
|||
txt_servicechargeAmount.setText(" : "+verificationViewModel.getServiceCharge()); |
|||
if(verificationViewModel.getBankAcNo()!=null&&verificationViewModel.getBankAcNo().length()>1) |
|||
{ |
|||
bankAcNoContainer.setVisibility(View.VISIBLE); |
|||
txt_bankAcNo.setText(" : "+verificationViewModel.getBankAcNo()); |
|||
} |
|||
String pAgent=verificationViewModel.getpAgent(); |
|||
|
|||
if(pAgent!=null) { |
|||
hideAgentLocation(false); |
|||
txt_pagent.setText(" : "+verificationViewModel.getpAgent()); |
|||
} |
|||
else |
|||
hideAgentLocation(true); |
|||
|
|||
|
|||
} |
|||
|
|||
private void hideAgentLocation(boolean action) { |
|||
if(action) |
|||
{ |
|||
pAgentContainerView.setVisibility(View.GONE); |
|||
} |
|||
else |
|||
{ |
|||
pAgentContainerView.setVisibility(View.VISIBLE); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public void onClick(View v) { |
|||
|
|||
switch(v.getId()) |
|||
{ |
|||
case R.id.exRateCalculateButton: |
|||
((ReSendMoneyActionListener)getActivity()).getPresenter().promptPinAndPerformTransaction(); |
|||
break; |
|||
case R.id.txt_user_aggreement: |
|||
openUserAgreement(); |
|||
break; |
|||
} |
|||
} |
|||
|
|||
private void openUserAgreement() { |
|||
// String url = "https://online.gmeremit.com/Terms"; |
|||
// Intent i = new Intent(Intent.ACTION_VIEW); |
|||
// i.setData(Uri.parse(url)); |
|||
// startActivity(i); |
|||
WebRequestModel requestModel=((ReSendMoneyActionListener)getActivity()).getPresenter().getWebRequestDataForTermsAndCondition(); |
|||
Intent intent= new Intent(getActivity(), TermsAndConditionV2BrowserActivity.class); |
|||
intent.putExtra(WEB_BROWSWER_URL_BUNDLE_KEY,requestModel); |
|||
startActivity(intent); |
|||
|
|||
} |
|||
} |
After Width: 185 | Height: 185 | Size: 6.5 KiB |
@ -0,0 +1,22 @@ |
|||
<?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="match_parent" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
android:background="@color/background_gray" |
|||
android:orientation="vertical" |
|||
tools:context=".sendmoneyV2.view.SendMoneyV2Activity"> |
|||
|
|||
<include layout="@layout/layout_sendmoney_toolbar" /> |
|||
|
|||
<FrameLayout |
|||
android:id="@+id/sendMoneyViewContainer" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="0dp" |
|||
android:layout_marginEnd="5dp" |
|||
android:layout_marginLeft="5dp" |
|||
android:layout_marginRight="5dp" |
|||
android:layout_marginStart="5dp" |
|||
android:layout_weight="1" /> |
|||
</LinearLayout> |
@ -0,0 +1,238 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.v4.widget.NestedScrollView 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_height="match_parent" |
|||
android:clickable="true" |
|||
android:scrollbars="none" |
|||
android:background="@color/background_gray" |
|||
tools:context="com.gmeremit.online.gmeremittance_native.exchange_rate.view.ExchangeMethodV2Activity" |
|||
android:layout_width="match_parent"> |
|||
|
|||
<LinearLayout |
|||
android:layout_marginTop="3dp" |
|||
android:background="@drawable/ic_rounded_white" |
|||
android:paddingStart="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:paddingRight="10dp" |
|||
android:paddingLeft="10dp" |
|||
android:paddingTop="20dp" |
|||
android:id="@+id/rootView" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<LinearLayout |
|||
android:layout_marginTop="10dp" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_marginRight="10dp" |
|||
android:layout_marginLeft="10dp" |
|||
android:background="@drawable/curve_rectangle_grey_bg" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
> |
|||
<LinearLayout |
|||
android:paddingLeft="5dp" |
|||
android:paddingRight="5dp" |
|||
android:orientation="vertical" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:paddingTop="3dp" |
|||
android:paddingStart="3dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="@string/you_send_text" |
|||
android:textColor="@color/darkgray" |
|||
android:textSize="16sp" |
|||
android:paddingLeft="3dp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeEditText |
|||
android:id="@+id/sendAmountEdTxt" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:backgroundTint="@android:color/transparent" |
|||
android:digits="0,1,2,3,4,5,6,7,8,9" |
|||
android:gravity="center_vertical" |
|||
android:hint="100,000" |
|||
android:imeOptions="actionDone" |
|||
android:inputType="textMultiLine|number" |
|||
android:maxLength="11" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="30sp" |
|||
app:edfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
<FrameLayout |
|||
android:background="@drawable/curve_rectangle_blue_bg" |
|||
android:paddingStart="5dp" |
|||
android:paddingEnd="5dp" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent"> |
|||
<LinearLayout |
|||
android:layout_gravity="center" |
|||
android:orientation="horizontal" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content"> |
|||
<ImageView |
|||
android:background="@drawable/flag_korean" |
|||
android:layout_gravity="center" |
|||
android:layout_width="50dp" |
|||
android:layout_height="45dp" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:gravity="center" |
|||
android:text="KRW" |
|||
android:paddingStart="5dp" |
|||
android:paddingEnd="5dp" |
|||
android:paddingRight="5dp" |
|||
android:paddingLeft="5dp" |
|||
android:textStyle="bold" |
|||
android:textColor="@color/white" |
|||
android:textSize="15sp"/> |
|||
</LinearLayout> |
|||
|
|||
</FrameLayout> |
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:paddingStart="10dp" |
|||
android:paddingRight="10dp" |
|||
android:paddingLeft="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:orientation="horizontal" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView |
|||
android:layout_width="wrap_content" |
|||
android:paddingStart="3dp" |
|||
android:paddingEnd="3dp" |
|||
android:layout_height="50dp" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/transferFeeTxtView" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:textColor="@color/darkgray" |
|||
android:gravity="center_vertical" |
|||
android:singleLine="false" |
|||
android:textSize="14sp"/> |
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:paddingStart="10dp" |
|||
android:paddingRight="10dp" |
|||
android:paddingLeft="10dp" |
|||
android:paddingEnd="10dp" |
|||
android:orientation="horizontal" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView |
|||
android:layout_width="wrap_content" |
|||
android:paddingStart="3dp" |
|||
android:paddingEnd="3dp" |
|||
android:layout_height="50dp" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/exchangeRateTxtView" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:textColor="@color/darkgray" |
|||
android:gravity="center_vertical" |
|||
android:textSize="14sp"/> |
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_marginRight="10dp" |
|||
android:layout_marginLeft="10dp" |
|||
android:padding="1.5dp" |
|||
android:background="@drawable/curve_rectangle_grey_bg" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
<LinearLayout |
|||
android:paddingLeft="5dp" |
|||
android:paddingRight="5dp" |
|||
android:orientation="vertical" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:paddingTop="3dp" |
|||
android:paddingStart="3dp" |
|||
android:text="@string/receipient_gets_text" |
|||
android:textColor="@color/darkgray" |
|||
android:textSize="16sp" |
|||
android:paddingLeft="3dp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeEditText |
|||
android:id="@+id/receiveAmountEdTxt" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:backgroundTint="@android:color/transparent" |
|||
android:digits="0,1,2,3,4,5,6,7,8,9" |
|||
android:gravity="center_vertical" |
|||
android:hint="100,000" |
|||
android:imeOptions="actionDone" |
|||
android:inputType="textMultiLine|number" |
|||
android:maxLength="11" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="30sp" |
|||
app:edfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
<FrameLayout |
|||
android:id="@+id/countrySelectionSpinner" |
|||
android:background="@drawable/curve_rectangle_blue_bg" |
|||
android:paddingStart="5dp" |
|||
android:paddingEnd="5dp" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent"> |
|||
<LinearLayout |
|||
android:layout_gravity="center" |
|||
android:orientation="horizontal" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content"> |
|||
<ImageView |
|||
android:id="@+id/recepientFlagImageView" |
|||
android:background="@drawable/flag_korean" |
|||
android:layout_gravity="center" |
|||
android:layout_width="50dp" |
|||
android:layout_height="45dp" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
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:textStyle="bold" |
|||
android:textColor="@color/white" |
|||
android:textSize="15sp"/> |
|||
</LinearLayout> |
|||
|
|||
</FrameLayout> |
|||
</LinearLayout> |
|||
|
|||
|
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton |
|||
android:id="@+id/amountDetailContinueButton" |
|||
android:layout_marginTop="40dp" |
|||
android:layout_marginBottom="20dp" |
|||
android:layout_width="200dp" |
|||
android:layout_height="50dp" |
|||
android:layout_gravity="center" |
|||
android:background="@drawable/ic_rounded_background_coloured" |
|||
android:text="@string/calculate_text" |
|||
android:textAllCaps="false" |
|||
android:textColor="@color/white" |
|||
android:textSize="18sp" /> |
|||
|
|||
</LinearLayout> |
|||
</android.support.v4.widget.NestedScrollView> |
@ -0,0 +1,393 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:background="@color/background_gray" |
|||
android:clickable="true" |
|||
android:scrollbars="none" |
|||
android:focusable="true"> |
|||
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical" |
|||
android:background="@drawable/ic_rounded_white" |
|||
android:layout_marginTop="3dp" |
|||
android:paddingEnd="20dp" |
|||
android:paddingTop="20dp" |
|||
android:paddingLeft="20dp" |
|||
android:paddingRight="20dp" |
|||
android:paddingStart="20dp"> |
|||
|
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical" |
|||
android:padding="10dp"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="@string/reciever_details_text" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="17sp" /> |
|||
<LinearLayout |
|||
|
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/full_name_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_firstName" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="Preyea R. Regmi" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/address_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_address" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="Jorpati" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/country_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_country" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="Nepal" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/mobile_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_mobile" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
|
|||
</LinearLayout> |
|||
|
|||
|
|||
|
|||
<LinearLayout |
|||
android:layout_marginTop="10dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical" |
|||
android:padding="10dp"> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="@string/transaction_detail_text" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="17sp" /> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/payout_country_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_pcountry" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="Nepal" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/payout_mode_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_pmode" |
|||
|
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="CASH Payment" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/paying_amount_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_pamount" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="50,000.00 KRW" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
android:textStyle="bold" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/exchange_rate_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_exrate" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="0.00977" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
android:textStyle="bold" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="@string/service_charge_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_servicechargeAmount" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="5000 KRW" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
android:textStyle="bold" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/pAgentContainerView" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:paddingTop="10dp" |
|||
|
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="top" |
|||
android:text="@string/payout_agent_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_pagent" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:text="[Any Where] lasjdkflasjdfklkasdhfksjdfhl" |
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
android:textStyle="bold" |
|||
android:singleLine="false" |
|||
android:inputType="textMultiLine" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:visibility="gone" |
|||
android:id="@+id/bankAcNoContainer" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:paddingTop="10dp" |
|||
android:text="Bank A/C No: " |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:id="@+id/txt_bankAcNo" |
|||
android:layout_width="0dp" |
|||
android:layout_weight="1" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
|
|||
android:textColor="@color/black" |
|||
android:textSize="13sp" |
|||
android:textStyle="bold" |
|||
app:txtfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
|
|||
|
|||
</LinearLayout> |
|||
|
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_marginTop="10dp" |
|||
android:layout_width="match_parent" |
|||
android:singleLine="false" |
|||
android:gravity="center" |
|||
android:maxLines="2" |
|||
android:layout_height="wrap_content" |
|||
android:text="@string/i_have_read_to_text" |
|||
android:textColor="@color/dark_gray" |
|||
android:textSize="13sp" /> |
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
|||
android:layout_marginBottom="20dp" |
|||
android:id="@+id/txt_user_aggreement" |
|||
android:paddingTop="3dp" |
|||
android:paddingBottom="3dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center" |
|||
android:text="@string/gme_user_aggreement_text" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="13sp" /> |
|||
|
|||
|
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton |
|||
android:id="@+id/exRateCalculateButton" |
|||
android:layout_width="200dp" |
|||
android:layout_height="50dp" |
|||
android:layout_gravity="center" |
|||
android:layout_marginBottom="20dp" |
|||
android:layout_marginTop="20dp" |
|||
android:background="@drawable/ic_rounded_background_coloured" |
|||
android:text="@string/agree_and_send_text" |
|||
android:textAllCaps="false" |
|||
android:textColor="@color/white" |
|||
android:textSize="18sp" /> |
|||
</LinearLayout> |
|||
</android.support.v4.widget.NestedScrollView> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue