refresh qr code when notes changed (#410)

This commit is contained in:
m2049r 2018-09-18 21:25:46 +02:00 committed by GitHub
parent 65991ff554
commit 5e6d3f3032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "com.m2049r.xmrwallet" applicationId "com.m2049r.xmrwallet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 27 targetSdkVersion 27
versionCode 122 versionCode 123
versionName "1.7.2 'OpenAlias'" versionName "1.7.3 'OpenAlias'"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {

View File

@ -25,7 +25,9 @@ import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.TextInputLayout; import android.support.design.widget.TextInputLayout;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.InputType; import android.text.InputType;
import android.text.TextWatcher;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -142,6 +144,22 @@ public class ReceiveFragment extends Fragment {
return false; 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() { bSubaddress.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -163,6 +181,8 @@ public class ReceiveFragment extends Fragment {
qrCode.setOnClickListener(new View.OnClickListener() { qrCode.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Helper.hideKeyboard(getActivity());
etDummy.requestFocus();
if (qrValid) { if (qrValid) {
qrCodeFull.setImageBitmap(((BitmapDrawable) qrCode.getDrawable()).getBitmap()); qrCodeFull.setImageBitmap(((BitmapDrawable) qrCode.getDrawable()).getBitmap());
qrCodeFull.setVisibility(View.VISIBLE); qrCodeFull.setVisibility(View.VISIBLE);