From 5e6d3f3032042f59734abd87ea3e7a5405344fef Mon Sep 17 00:00:00 2001 From: m2049r Date: Tue, 18 Sep 2018 21:25:46 +0200 Subject: [PATCH] refresh qr code when notes changed (#410) --- app/build.gradle | 4 ++-- .../com/m2049r/xmrwallet/ReceiveFragment.java | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 522851eb..e5ac882f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.m2049r.xmrwallet" minSdkVersion 21 targetSdkVersion 27 - versionCode 122 - versionName "1.7.2 'OpenAlias'" + versionCode 123 + versionName "1.7.3 'OpenAlias'" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { diff --git a/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java b/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java index df7ac981..9e88aa7f 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/ReceiveFragment.java @@ -25,7 +25,9 @@ import android.os.AsyncTask; import android.os.Bundle; import android.support.design.widget.TextInputLayout; import android.support.v4.app.Fragment; +import android.text.Editable; import android.text.InputType; +import android.text.TextWatcher; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; @@ -142,6 +144,22 @@ public class ReceiveFragment extends Fragment { return false; } }); + notesEdit.addTextChangedListener(new 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) { + clearQR(); + } + + @Override + public void afterTextChanged(Editable s) { + + } + }); bSubaddress.setOnClickListener(new View.OnClickListener() { @Override @@ -163,6 +181,8 @@ public class ReceiveFragment extends Fragment { qrCode.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + Helper.hideKeyboard(getActivity()); + etDummy.requestFocus(); if (qrValid) { qrCodeFull.setImageBitmap(((BitmapDrawable) qrCode.getDrawable()).getBitmap()); qrCodeFull.setVisibility(View.VISIBLE);