From 93ec3865da1436c91312cf58e654e956b540ee56 Mon Sep 17 00:00:00 2001 From: m2049r <30435443+m2049r@users.noreply.github.com> Date: Thu, 31 Aug 2017 18:43:51 +0200 Subject: [PATCH] fix scan button enable/disable --- app/build.gradle | 4 ++-- app/src/main/java/com/m2049r/xmrwallet/SendFragment.java | 8 +++++--- app/src/main/res/layout/send_fragment.xml | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 04348660..11b160a2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.m2049r.xmrwallet" minSdkVersion 21 targetSdkVersion 25 - versionCode 9 - versionName "0.5.2" + versionCode 10 + versionName "0.5.3" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { diff --git a/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java b/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java index 4d196c7c..72be4a4d 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java @@ -51,7 +51,7 @@ public class SendFragment extends Fragment { EditText etAddress; EditText etPaymentId; EditText etAmount; - Button bAddress; + Button bScan; Button bSweep; Spinner sMixin; Spinner sPriority; @@ -84,7 +84,7 @@ public class SendFragment extends Fragment { etAddress = (EditText) view.findViewById(R.id.etAddress); etPaymentId = (EditText) view.findViewById(R.id.etPaymentId); etAmount = (EditText) view.findViewById(R.id.etAmount); - bAddress = (Button) view.findViewById(R.id.bAddress); + bScan = (Button) view.findViewById(R.id.bScan); bSweep = (Button) view.findViewById(R.id.bSweep); bPrepareSend = (Button) view.findViewById(R.id.bPrepareSend); bPaymentId = (Button) view.findViewById(R.id.bPaymentId); @@ -199,7 +199,7 @@ public class SendFragment extends Fragment { } }); - bAddress.setOnClickListener(new View.OnClickListener() { + bScan.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { activityCallback.onScanAddress(); @@ -321,6 +321,7 @@ public class SendFragment extends Fragment { etAddress.setEnabled(false); etPaymentId.setEnabled(false); etAmount.setEnabled(false); + bScan.setEnabled(false); bPaymentId.setEnabled(false); bSweep.setEnabled(false); bPrepareSend.setEnabled(false); @@ -332,6 +333,7 @@ public class SendFragment extends Fragment { etAddress.setEnabled(true); etPaymentId.setEnabled(true); etAmount.setEnabled(true); + bScan.setEnabled(true); bPaymentId.setEnabled(true); bSweep.setEnabled(true); bPrepareSend.setEnabled(true); diff --git a/app/src/main/res/layout/send_fragment.xml b/app/src/main/res/layout/send_fragment.xml index 135132da..f7e5cc44 100644 --- a/app/src/main/res/layout/send_fragment.xml +++ b/app/src/main/res/layout/send_fragment.xml @@ -52,7 +52,7 @@ android:textSize="16sp" />