Preyea Regmi
6 years ago
11 changed files with 332 additions and 28 deletions
-
BIN.idea/caches/build_file_checksums.ser
-
2.idea/misc.xml
-
2.idea/modules.xml
-
48app/src/main/AndroidManifest.xml
-
5app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/pennytest/PennyTestModalFragment.java
-
45app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/gateway/WithdrawV2Gateway.java
-
15app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/presenter/WithdrawV2InteractorInterface.java
-
23app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/presenter/WithdrawV2Presenter.java
-
17app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/presenter/WithdrawV2PresenterInterface.java
-
16app/src/main/java/com/gmeremit/online/gmeremittance_native/withdrawV2/view/WithdrawV2Activity.java
-
187app/src/main/res/layout/activity_withdraw_v2.xml
@ -0,0 +1,45 @@ |
|||||
|
package com.gmeremit.online.gmeremittance_native.withdrawV2.gateway; |
||||
|
|
||||
|
import com.gmeremit.online.gmeremittance_native.base.PrivilegedGateway; |
||||
|
import com.gmeremit.online.gmeremittance_native.utils.https.HttpClientV2; |
||||
|
import com.gmeremit.online.gmeremittance_native.walletstatementV2.model.WalletStatementV2APIResponse; |
||||
|
import com.gmeremit.online.gmeremittance_native.walletstatementV2.presenter.WalletStatementV2InteractorInterface; |
||||
|
import com.gmeremit.online.gmeremittance_native.withdrawV2.presenter.WithdrawV2InteractorInterface; |
||||
|
import com.google.gson.JsonObject; |
||||
|
|
||||
|
import io.reactivex.Observable; |
||||
|
|
||||
|
public class WithdrawV2Gateway extends PrivilegedGateway implements WithdrawV2InteractorInterface.WithdrawV2GatewayInterface { |
||||
|
|
||||
|
private final WithdrawV2InteractorInterface interactor; |
||||
|
|
||||
|
private String mockedString="{\n" + |
||||
|
" \"ErrorCode\": \"0\",\n" + |
||||
|
" \"Msg\": \"1 wallet txn\",\n" + |
||||
|
" \"Id\": null,\n" + |
||||
|
" \"Extra\": \"\",\n" + |
||||
|
" \"Extra2\": \"\",\n" + |
||||
|
" \"Data\": [\n" + |
||||
|
" {\n" + |
||||
|
" \"TransactionDate\": \"1900.01.01\",\n" + |
||||
|
" \"Particular\": \"Balance Brought Forward\",\n" + |
||||
|
" \"WalletIn\": \"₩0\",\n" + |
||||
|
" \"WalletOut\": \"₩100,000,000\",\n" + |
||||
|
" \"ClosingAmount\": \"-₩85,000\"\n" + |
||||
|
" },\n" + |
||||
|
" {\n" + |
||||
|
" \"TransactionDate\": \"1900.01.01\",\n" + |
||||
|
" \"Particular\": \"Balance Brought Backward\",\n" + |
||||
|
" \"WalletIn\": \"₩200,000,000\",\n" + |
||||
|
" \"WalletOut\": \"₩0\",\n" + |
||||
|
" \"ClosingAmount\": \"-₩100,000\"\n" + |
||||
|
" }\n" + |
||||
|
" ]\n" + |
||||
|
"}"; |
||||
|
|
||||
|
public WithdrawV2Gateway(WithdrawV2InteractorInterface interactor) { |
||||
|
this.interactor=interactor; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.gmeremit.online.gmeremittance_native.withdrawV2.presenter; |
||||
|
|
||||
|
import com.gmeremit.online.gmeremittance_native.base.BaseInteractorInterface; |
||||
|
import com.gmeremit.online.gmeremittance_native.base.PrivilegedGatewayInterface; |
||||
|
import com.gmeremit.online.gmeremittance_native.walletstatementV2.model.WalletStatementV2APIResponse; |
||||
|
|
||||
|
import io.reactivex.Observable; |
||||
|
|
||||
|
public interface WithdrawV2InteractorInterface extends BaseInteractorInterface { |
||||
|
|
||||
|
|
||||
|
interface WithdrawV2GatewayInterface extends PrivilegedGatewayInterface |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.gmeremit.online.gmeremittance_native.withdrawV2.presenter; |
||||
|
|
||||
|
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; |
||||
|
import com.gmeremit.online.gmeremittance_native.withdrawV2.gateway.WithdrawV2Gateway; |
||||
|
|
||||
|
import io.reactivex.disposables.CompositeDisposable; |
||||
|
|
||||
|
public class WithdrawV2Presenter extends BasePresenter implements WithdrawV2PresenterInterface,WithdrawV2InteractorInterface { |
||||
|
|
||||
|
private final WithdrawV2ContractInterface view; |
||||
|
private final WithdrawV2GatewayInterface gateway; |
||||
|
private final CompositeDisposable compositeDisposables; |
||||
|
|
||||
|
public WithdrawV2Presenter(WithdrawV2ContractInterface view) { |
||||
|
this.view=view; |
||||
|
this.gateway=new WithdrawV2Gateway(this); |
||||
|
compositeDisposables=new CompositeDisposable(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.gmeremit.online.gmeremittance_native.withdrawV2.presenter; |
||||
|
|
||||
|
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface; |
||||
|
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface; |
||||
|
import com.gmeremit.online.gmeremittance_native.walletstatementV2.model.WalletStatementV2ItemModel; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
public interface WithdrawV2PresenterInterface extends BasePresenterInterface { |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
interface WithdrawV2ContractInterface extends BaseContractInterface { |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.gmeremit.online.gmeremittance_native.withdrawV2.view; |
||||
|
|
||||
|
import android.support.v7.app.AppCompatActivity; |
||||
|
import android.os.Bundle; |
||||
|
|
||||
|
import com.gmeremit.online.gmeremittance_native.R; |
||||
|
import com.gmeremit.online.gmeremittance_native.base.BaseActivity; |
||||
|
|
||||
|
public class WithdrawV2Activity extends BaseActivity { |
||||
|
|
||||
|
@Override |
||||
|
protected void onCreate(Bundle savedInstanceState) { |
||||
|
super.onCreate(savedInstanceState); |
||||
|
setContentView(R.layout.activity_withdraw_v2); |
||||
|
} |
||||
|
} |
@ -0,0 +1,187 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<ScrollView 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"> |
||||
|
|
||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="3dp" |
||||
|
android:layout_marginStart="3dp" |
||||
|
android:layout_marginEnd="3dp" |
||||
|
android:background="@drawable/ic_rounded_white" |
||||
|
tools:context=".withdrawV2.view.WithdrawV2Activity"> |
||||
|
|
||||
|
|
||||
|
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
||||
|
android:id="@+id/withdrawTitle" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginStart="8dp" |
||||
|
android:layout_marginTop="16dp" |
||||
|
android:layout_marginEnd="8dp" |
||||
|
android:layout_marginBottom="8dp" |
||||
|
android:gravity="center" |
||||
|
android:singleLine="false" |
||||
|
android:text="How much would you like to refund?" |
||||
|
android:textColor="@color/darkgray" |
||||
|
android:textSize="21sp" |
||||
|
app:layout_constraintBottom_toTopOf="@+id/withdrawAvailableTxt" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toTopOf="parent" |
||||
|
app:layout_constraintVertical_chainStyle="packed" /> |
||||
|
|
||||
|
|
||||
|
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
||||
|
android:id="@+id/withdrawAvailableTxt" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginStart="8dp" |
||||
|
android:layout_marginEnd="8dp" |
||||
|
android:gravity="center" |
||||
|
android:singleLine="false" |
||||
|
android:text="Available Balance : 99,745,176(KRW)" |
||||
|
android:textColor="@color/darkgray" |
||||
|
android:textSize="17sp" |
||||
|
app:layout_constraintBottom_toTopOf="@+id/withdrawBankChargeTxt" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toBottomOf="@+id/withdrawTitle" /> |
||||
|
|
||||
|
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
||||
|
android:id="@+id/withdrawBankChargeTxt" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginStart="8dp" |
||||
|
android:layout_marginEnd="8dp" |
||||
|
android:layout_marginBottom="8dp" |
||||
|
android:gravity="center" |
||||
|
android:singleLine="false" |
||||
|
android:text="Pre Fund Bank Charge : 1,000(KRW)" |
||||
|
android:textColor="@color/darkgray" |
||||
|
android:textSize="18sp" |
||||
|
app:layout_constraintBottom_toTopOf="@+id/refundMoneyContainer" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toBottomOf="@+id/withdrawAvailableTxt" /> |
||||
|
|
||||
|
|
||||
|
<LinearLayout |
||||
|
android:id="@+id/refundMoneyContainer" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginStart="8dp" |
||||
|
android:layout_marginTop="24dp" |
||||
|
android:layout_marginEnd="8dp" |
||||
|
android:background="@drawable/curve_rectangle_grey_bg" |
||||
|
android:orientation="horizontal" |
||||
|
app:layout_constraintBottom_toTopOf="@+id/refundButton" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toBottomOf="@+id/withdrawBankChargeTxt"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_weight="1" |
||||
|
android:orientation="vertical" |
||||
|
android:paddingLeft="5dp" |
||||
|
android:paddingRight="5dp"> |
||||
|
|
||||
|
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
||||
|
android:id="@+id/bank_label" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:paddingStart="3dp" |
||||
|
android:paddingLeft="3dp" |
||||
|
android:paddingTop="3dp" |
||||
|
android:text="You Refund" |
||||
|
android:textColor="@color/darkgray" |
||||
|
android:textSize="16sp" /> |
||||
|
|
||||
|
<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:text="1000000000000000000000000000000000000000" |
||||
|
android:textColor="@color/colorPrimary" |
||||
|
android:textSize="30sp" |
||||
|
app:edfontName="@string/semibold" /> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
<FrameLayout |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="match_parent" |
||||
|
android:background="@drawable/curve_rectangle_blue_bg" |
||||
|
android:paddingStart="5dp" |
||||
|
android:paddingEnd="5dp"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<ImageView |
||||
|
android:layout_width="50dp" |
||||
|
android:layout_height="45dp" |
||||
|
android:layout_gravity="center" |
||||
|
android:background="@drawable/flag_korean" /> |
||||
|
|
||||
|
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeTextView |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="match_parent" |
||||
|
android:gravity="center" |
||||
|
android:paddingStart="5dp" |
||||
|
android:paddingLeft="5dp" |
||||
|
android:paddingEnd="5dp" |
||||
|
android:paddingRight="5dp" |
||||
|
android:text="KRW" |
||||
|
android:textColor="@color/white" |
||||
|
android:textSize="15sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
|
||||
|
</LinearLayout> |
||||
|
|
||||
|
</FrameLayout> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
|
||||
|
<com.gmeremit.online.gmeremittance_native.customwidgets.GmeButton |
||||
|
android:id="@+id/refundButton" |
||||
|
android:layout_width="200dp" |
||||
|
android:layout_height="50dp" |
||||
|
android:layout_gravity="center" |
||||
|
android:layout_marginStart="8dp" |
||||
|
android:layout_marginTop="30dp" |
||||
|
android:layout_marginEnd="8dp" |
||||
|
android:layout_marginBottom="20dp" |
||||
|
android:background="@drawable/ic_rounded_background_coloured" |
||||
|
android:text="Calculate" |
||||
|
android:textAllCaps="false" |
||||
|
android:textColor="@color/white" |
||||
|
android:textSize="18sp" |
||||
|
app:layout_constraintBottom_toTopOf="@+id/withdrawTitle" |
||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||
|
app:layout_constraintStart_toStartOf="parent" |
||||
|
app:layout_constraintTop_toBottomOf="@+id/refundMoneyContainer" /> |
||||
|
|
||||
|
|
||||
|
</android.support.constraint.ConstraintLayout> |
||||
|
</ScrollView> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue