From d816dc7f0e43a4aefc7ebc679e7be57749353870 Mon Sep 17 00:00:00 2001 From: preyearegmi Date: Thu, 11 Oct 2018 11:54:57 +0900 Subject: [PATCH] Home page fixes --- .../view/ExchangeMethodV2Activity.java | 21 +++++++++++++++++++ .../layout/activity_exchange_method_v2.xml | 1 + .../exchange_paymentmode_rv_viewholder.xml | 3 ++- app/src/main/res/layout/fragment_home_v2.xml | 13 ++++-------- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/view/ExchangeMethodV2Activity.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/view/ExchangeMethodV2Activity.java index f40bf609..c4bb7a15 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/view/ExchangeMethodV2Activity.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/exchange_rate/view/ExchangeMethodV2Activity.java @@ -6,6 +6,7 @@ import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.TextWatcher; +import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.animation.AccelerateDecelerateInterpolator; @@ -71,6 +72,9 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod @BindView(R.id.iv_cancel) View iv_cancel; + @BindView(R.id.rootView) + View rootView; + @BindView(R.id.exRateCalculateButton) Button exRateCalculateButton; @@ -198,6 +202,23 @@ public class ExchangeMethodV2Activity extends BaseActivity implements PaymentMod this.recepientCurrencyTextView.setText("---"); } + + + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + if(sendMoneyEditText.hasFocus()||recieveMoneyEditText.hasFocus()) + { + + View currentViewWithFocus=getCurrentFocus(); + if(currentViewWithFocus!=null) + currentViewWithFocus.clearFocus(); + + hideKeyBoard(); + return true; + } + return super.dispatchTouchEvent(ev); + } + @Override public void onClick(View v) { switch (v.getId()) { diff --git a/app/src/main/res/layout/activity_exchange_method_v2.xml b/app/src/main/res/layout/activity_exchange_method_v2.xml index 5df32f35..7e486e2a 100644 --- a/app/src/main/res/layout/activity_exchange_method_v2.xml +++ b/app/src/main/res/layout/activity_exchange_method_v2.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_height="match_parent" android:clickable="true" + android:id="@+id/rootView" tools:context="com.gmeremit.online.gmeremittance_native.exchange_rate.view.ExchangeMethodV2Activity" android:layout_width="match_parent" android:focusable="true"> diff --git a/app/src/main/res/layout/exchange_paymentmode_rv_viewholder.xml b/app/src/main/res/layout/exchange_paymentmode_rv_viewholder.xml index 168ae0e4..55ad1f92 100644 --- a/app/src/main/res/layout/exchange_paymentmode_rv_viewholder.xml +++ b/app/src/main/res/layout/exchange_paymentmode_rv_viewholder.xml @@ -23,11 +23,12 @@ android:src="@drawable/ic_home_delivery" /> + android:visibility="visible">