Preyea Regmi
5 years ago
9 changed files with 490 additions and 8 deletions
-
BIN.idea/caches/build_file_checksums.ser
-
6app/src/main/AndroidManifest.xml
-
7app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/gateway/DomesticRemitGateway.java
-
4app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/presenter/DomesticRemitGatewayInterface.java
-
14app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/presenter/DomesticRemitPresenterImpl.java
-
15app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/presenter/DomesticRemitPresenterInterface.java
-
210app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/view/DomesticRemitActivity.java
-
231app/src/main/res/layout/activity_domestic_remit.xml
-
11app/src/main/res/values/strings.xml
@ -0,0 +1,7 @@ |
|||
package com.gmeremit.online.gmeremittance_native.domesticremit.gateway; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.base.PrivilegedGateway; |
|||
import com.gmeremit.online.gmeremittance_native.domesticremit.presenter.DomesticRemitGatewayInterface; |
|||
|
|||
public class DomesticRemitGateway extends PrivilegedGateway implements DomesticRemitGatewayInterface { |
|||
} |
@ -0,0 +1,4 @@ |
|||
package com.gmeremit.online.gmeremittance_native.domesticremit.presenter; |
|||
|
|||
public interface DomesticRemitGatewayInterface { |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.gmeremit.online.gmeremittance_native.domesticremit.presenter; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; |
|||
|
|||
public class DomesticRemitPresenterImpl extends BasePresenter implements DomesticRemitPresenterInterface { |
|||
|
|||
private final DomesticRemitContractInterface view; |
|||
private final DomesticRemitGatewayInterface gateway; |
|||
|
|||
public DomesticRemitPresenterImpl(DomesticRemitContractInterface view, DomesticRemitGatewayInterface gatewayInterface) { |
|||
this.view=view; |
|||
this.gateway=gatewayInterface; |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.gmeremit.online.gmeremittance_native.domesticremit.presenter; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface; |
|||
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface; |
|||
import com.zoyi.channel.plugin.android.contract.BasePresenter; |
|||
|
|||
|
|||
public interface DomesticRemitPresenterInterface extends BasePresenterInterface { |
|||
|
|||
|
|||
interface DomesticRemitContractInterface extends BaseContractInterface |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,210 @@ |
|||
package com.gmeremit.online.gmeremittance_native.domesticremit.view; |
|||
|
|||
import android.os.Bundle; |
|||
import android.view.View; |
|||
import android.widget.Button; |
|||
import android.widget.EditText; |
|||
|
|||
import com.gmeremit.online.gmeremittance_native.R; |
|||
import com.gmeremit.online.gmeremittance_native.base.BaseActivity; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField; |
|||
import com.gmeremit.online.gmeremittance_native.customwidgets.TextWatcherAdapter; |
|||
import com.gmeremit.online.gmeremittance_native.domesticremit.gateway.DomesticRemitGateway; |
|||
import com.gmeremit.online.gmeremittance_native.domesticremit.presenter.DomesticRemitPresenterImpl; |
|||
import com.gmeremit.online.gmeremittance_native.domesticremit.presenter.DomesticRemitPresenterInterface; |
|||
|
|||
import butterknife.BindView; |
|||
import butterknife.ButterKnife; |
|||
|
|||
public class DomesticRemitActivity extends BaseActivity implements DomesticRemitPresenterInterface.DomesticRemitContractInterface, View.OnClickListener { |
|||
|
|||
@BindView(R.id.senderBankSelectionViewContainer) |
|||
View senderBankSelectionViewContainer; |
|||
|
|||
@BindView(R.id.senderBankSelectionFormInputField) |
|||
GMEFormInputField senderBankSelectionFormInputField; |
|||
|
|||
@BindView(R.id.recipientBankSelectionViewContainer) |
|||
View recipientBankSelectionViewContainer; |
|||
|
|||
@BindView(R.id.recipientBankSelectionFormInputField) |
|||
GMEFormInputField recipientBankSelectionFormInputField; |
|||
|
|||
@BindView(R.id.recipientAccountNoFormInputField) |
|||
GMEFormInputField recipientAccountNoFormInputField; |
|||
|
|||
@BindView(R.id.recipientFullNameFormInputField) |
|||
GMEFormInputField recipientFullNameFormInputField; |
|||
|
|||
@BindView(R.id.recipientMobileNoFormInputField) |
|||
GMEFormInputField recipientMobileNoFormInputField; |
|||
|
|||
@BindView(R.id.sendAmountEdTxt) |
|||
EditText sendAmountEdTxt; |
|||
|
|||
@BindView(R.id.iv_back) |
|||
View iv_back; |
|||
|
|||
@BindView(R.id.iv_cancel) |
|||
View iv_cancel; |
|||
|
|||
@BindView(R.id.btn_submit) |
|||
Button submitBtn; |
|||
|
|||
RecipientFullNameTextWatcher recipientFullNameTextWatcher; |
|||
RecipientMobileNoTextWatcher recipientMobileNoTextWatcher; |
|||
RecipientAccountNoTextWatcher recipientAccountNoTextWatcher; |
|||
RecipientSendingAmountTextWatcher recipientSendingAmountTextWatcher; |
|||
|
|||
SenderBankSelectionClickListener senderBankSelectionClickListener; |
|||
RecipientBankSelectionClickListener recipientBankSelectionClickListener; |
|||
|
|||
private DomesticRemitPresenterImpl presenter; |
|||
|
|||
@Override |
|||
protected void onCreate(Bundle savedInstanceState) { |
|||
super.onCreate(savedInstanceState); |
|||
setContentView(R.layout.activity_domestic_remit); |
|||
ButterKnife.bind(this); |
|||
init(); |
|||
performDefaultAction(savedInstanceState); |
|||
} |
|||
|
|||
private void performDefaultAction(Bundle savedInstanceState) { |
|||
|
|||
} |
|||
|
|||
private void init() { |
|||
this.presenter= new DomesticRemitPresenterImpl(this,new DomesticRemitGateway()); |
|||
initListeners(); |
|||
|
|||
iv_cancel.setVisibility(View.INVISIBLE); |
|||
|
|||
} |
|||
|
|||
private void initListeners() { |
|||
recipientFullNameTextWatcher=new RecipientFullNameTextWatcher(); |
|||
recipientMobileNoTextWatcher=new RecipientMobileNoTextWatcher(); |
|||
recipientAccountNoTextWatcher=new RecipientAccountNoTextWatcher(); |
|||
recipientSendingAmountTextWatcher=new RecipientSendingAmountTextWatcher(); |
|||
|
|||
senderBankSelectionClickListener=new SenderBankSelectionClickListener(); |
|||
recipientBankSelectionClickListener=new RecipientBankSelectionClickListener(); |
|||
} |
|||
|
|||
|
|||
private void registerTextWatchers(boolean action) |
|||
{ |
|||
if(action) |
|||
{ |
|||
recipientFullNameFormInputField.addTextWatchers(recipientFullNameTextWatcher); |
|||
recipientMobileNoFormInputField.addTextWatchers(recipientMobileNoTextWatcher); |
|||
recipientAccountNoFormInputField.addTextWatchers(recipientAccountNoTextWatcher); |
|||
sendAmountEdTxt.addTextChangedListener(recipientSendingAmountTextWatcher); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
recipientFullNameFormInputField.removeTextWatchers(recipientFullNameTextWatcher); |
|||
recipientMobileNoFormInputField.removeTextWatchers(recipientMobileNoTextWatcher); |
|||
recipientAccountNoFormInputField.removeTextWatchers(recipientAccountNoTextWatcher); |
|||
sendAmountEdTxt.removeTextChangedListener(recipientSendingAmountTextWatcher); |
|||
} |
|||
} |
|||
|
|||
private void registerClickListeners(boolean action) |
|||
{ |
|||
if(action) |
|||
{ |
|||
submitBtn.setOnClickListener(this); |
|||
iv_back.setOnClickListener(this); |
|||
|
|||
recipientBankSelectionFormInputField.getEditTextView().setOnClickListener(recipientBankSelectionClickListener); |
|||
senderBankSelectionFormInputField.getEditTextView().setOnClickListener(senderBankSelectionClickListener); |
|||
|
|||
|
|||
} |
|||
else |
|||
{ |
|||
submitBtn.setOnClickListener(null); |
|||
iv_back.setOnClickListener(null); |
|||
|
|||
recipientBankSelectionFormInputField.getEditTextView().setOnClickListener(null); |
|||
senderBankSelectionFormInputField.getEditTextView().setOnClickListener(null); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
protected void onStart() { |
|||
super.onStart(); |
|||
registerTextWatchers(true); |
|||
registerClickListeners(true); |
|||
} |
|||
|
|||
@Override |
|||
protected void onStop() { |
|||
super.onStop(); |
|||
registerTextWatchers(false); |
|||
registerClickListeners(false); |
|||
} |
|||
|
|||
@Override |
|||
public void onClick(View v) { |
|||
switch(v.getId()) |
|||
{ |
|||
case R.id.iv_back: |
|||
onBackPressed(); |
|||
break; |
|||
|
|||
case R.id.btn_submit: |
|||
if (submitBtn.isEnabled()) |
|||
|
|||
break; |
|||
} |
|||
} |
|||
|
|||
public class RecipientFullNameTextWatcher extends TextWatcherAdapter { |
|||
@Override |
|||
public void onTextUpdated(String text) { |
|||
|
|||
} |
|||
} |
|||
public class RecipientMobileNoTextWatcher extends TextWatcherAdapter { |
|||
@Override |
|||
public void onTextUpdated(String text) { |
|||
|
|||
} |
|||
} |
|||
public class RecipientAccountNoTextWatcher extends TextWatcherAdapter { |
|||
@Override |
|||
public void onTextUpdated(String text) { |
|||
|
|||
} |
|||
} |
|||
public class RecipientSendingAmountTextWatcher extends TextWatcherAdapter { |
|||
@Override |
|||
public void onTextUpdated(String text) { |
|||
|
|||
} |
|||
} |
|||
|
|||
public class SenderBankSelectionClickListener implements View.OnClickListener { |
|||
|
|||
@Override |
|||
public void onClick(View v) { |
|||
hideKeyBoard(); |
|||
|
|||
} |
|||
} |
|||
|
|||
public class RecipientBankSelectionClickListener implements View.OnClickListener { |
|||
|
|||
@Override |
|||
public void onClick(View v) { |
|||
hideKeyBoard(); |
|||
|
|||
} |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,231 @@ |
|||
<?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_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:background="@color/white" |
|||
tools:context=".domesticremit.view.DomesticRemitActivity"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<include layout="@layout/layout_sendmoney_toolbar" /> |
|||
|
|||
<LinearLayout |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
<TextView |
|||
android:textSize="17sp" |
|||
android:layout_marginBottom="10dp" |
|||
android:layout_marginTop="10dp" |
|||
android:padding="10dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
tools:text="50,0000 KRW" |
|||
android:gravity="center"/> |
|||
<LinearLayout |
|||
android:id="@+id/senderBankSelectionViewContainer" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:visibility="visible"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField |
|||
android:id="@+id/senderBankSelectionFormInputField" |
|||
style="@style/gme_form_text_input_layout" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_weight="1" |
|||
android:visibility="visible" |
|||
app:edFormCursorVisible="false" |
|||
app:edFormFocusable="false" |
|||
android:hint="Select your bank" /> |
|||
|
|||
<ImageView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center_vertical|end" |
|||
android:layout_marginStart="@dimen/_4sdp" |
|||
android:layout_marginEnd="@dimen/_4sdp" |
|||
android:background="@drawable/ic_arrow_down" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
|
|||
|
|||
<LinearLayout |
|||
android:layout_marginTop="10dp" |
|||
android:layout_marginBottom="10dp" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:background="@drawable/curve_rectangle_grey_bg" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
> |
|||
<LinearLayout |
|||
android:id="@+id/sendMoneyViewContainer" |
|||
android:paddingLeft="@dimen/_4sdp" |
|||
android:paddingRight="@dimen/_4sdp" |
|||
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="@dimen/_2sdp" |
|||
android:paddingStart="@dimen/_2sdp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Amount to be sent" |
|||
android:textColor="@color/darkgray" |
|||
android:textSize="@dimen/_14ssp" |
|||
android:paddingLeft="@dimen/_2sdp" /> |
|||
|
|||
<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:singleLine="false" |
|||
android:textColor="@color/colorPrimary" |
|||
android:textSize="@dimen/_24ssp" |
|||
app:edfontName="@string/semibold" /> |
|||
</LinearLayout> |
|||
<FrameLayout |
|||
android:background="@drawable/curve_rectangle_blue_bg" |
|||
android:paddingStart="@dimen/_4sdp" |
|||
android:paddingEnd="@dimen/_4sdp" |
|||
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_south_korea" |
|||
android:layout_gravity="center" |
|||
android:layout_width="@dimen/_34sdp" |
|||
android:layout_height="@dimen/_30sdp" /> |
|||
<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="@dimen/_4sdp" |
|||
android:paddingEnd="@dimen/_4sdp" |
|||
android:paddingRight="@dimen/_4sdp" |
|||
android:paddingLeft="@dimen/_4sdp" |
|||
android:textStyle="bold" |
|||
android:textColor="@color/white" |
|||
android:textSize="@dimen/_12ssp"/> |
|||
<View |
|||
android:layout_gravity="center_vertical" |
|||
android:layout_width="@dimen/_18sdp" |
|||
android:layout_height="@dimen/_17sdp"/> |
|||
</LinearLayout> |
|||
|
|||
</FrameLayout> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/recipientBankSelectionViewContainer" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:visibility="visible"> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField |
|||
android:id="@+id/recipientBankSelectionFormInputField" |
|||
style="@style/gme_form_text_input_layout" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_weight="1" |
|||
android:visibility="visible" |
|||
app:edFormCursorVisible="false" |
|||
app:edFormFocusable="false" |
|||
android:hint="@string/select_bank_text" /> |
|||
|
|||
<ImageView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center_vertical|end" |
|||
android:layout_marginStart="@dimen/_4sdp" |
|||
android:layout_marginEnd="@dimen/_4sdp" |
|||
android:background="@drawable/ic_arrow_down" /> |
|||
</LinearLayout> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField |
|||
android:layout_marginStart="10dp" |
|||
android:id="@+id/recipientAccountNoFormInputField" |
|||
style="@style/gme_form_text_input_layout" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginEnd="10dp" |
|||
android:visibility="visible" |
|||
android:hint="@string/account_text" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField |
|||
android:id="@+id/recipientFullNameFormInputField" |
|||
style="@style/gme_form_text_input_layout" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_marginStart="10dp" |
|||
android:visibility="visible" |
|||
android:hint="@string/full_name_text" /> |
|||
|
|||
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField |
|||
android:id="@+id/recipientMobileNoFormInputField" |
|||
style="@style/gme_form_text_input_layout" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginEnd="10dp" |
|||
android:layout_marginStart="10dp" |
|||
android:visibility="visible" |
|||
android:hint="@string/mobile_number_text" /> |
|||
|
|||
<View |
|||
android:background="@color/gray" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="2dp"/> |
|||
|
|||
<TextView |
|||
android:textSize="17sp" |
|||
android:padding="10dp" |
|||
android:gravity="center" |
|||
android:text="Service Charge : 1000 KRW" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" /> |
|||
|
|||
<Button |
|||
android:id="@+id/btn_submit" |
|||
android:layout_width="200dp" |
|||
android:layout_height="45dp" |
|||
android:layout_gravity="center" |
|||
android:layout_marginTop="20dp" |
|||
android:layout_marginBottom="30dp" |
|||
android:background="@drawable/ic_rounded_background_coloured" |
|||
android:enabled="false" |
|||
android:text="@string/send_money_text" |
|||
android:textAllCaps="false" |
|||
android:textColor="@color/white" |
|||
android:textSize="16sp" /> |
|||
</LinearLayout> |
|||
|
|||
|
|||
|
|||
</ScrollView> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue