fix scan button enable/disable

This commit is contained in:
m2049r 2017-08-31 18:43:51 +02:00
parent 49e338e80d
commit 93ec3865da
3 changed files with 8 additions and 6 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "com.m2049r.xmrwallet" applicationId "com.m2049r.xmrwallet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 25 targetSdkVersion 25
versionCode 9 versionCode 10
versionName "0.5.2" versionName "0.5.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {

View File

@ -51,7 +51,7 @@ public class SendFragment extends Fragment {
EditText etAddress; EditText etAddress;
EditText etPaymentId; EditText etPaymentId;
EditText etAmount; EditText etAmount;
Button bAddress; Button bScan;
Button bSweep; Button bSweep;
Spinner sMixin; Spinner sMixin;
Spinner sPriority; Spinner sPriority;
@ -84,7 +84,7 @@ public class SendFragment extends Fragment {
etAddress = (EditText) view.findViewById(R.id.etAddress); etAddress = (EditText) view.findViewById(R.id.etAddress);
etPaymentId = (EditText) view.findViewById(R.id.etPaymentId); etPaymentId = (EditText) view.findViewById(R.id.etPaymentId);
etAmount = (EditText) view.findViewById(R.id.etAmount); 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); bSweep = (Button) view.findViewById(R.id.bSweep);
bPrepareSend = (Button) view.findViewById(R.id.bPrepareSend); bPrepareSend = (Button) view.findViewById(R.id.bPrepareSend);
bPaymentId = (Button) view.findViewById(R.id.bPaymentId); 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 @Override
public void onClick(View v) { public void onClick(View v) {
activityCallback.onScanAddress(); activityCallback.onScanAddress();
@ -321,6 +321,7 @@ public class SendFragment extends Fragment {
etAddress.setEnabled(false); etAddress.setEnabled(false);
etPaymentId.setEnabled(false); etPaymentId.setEnabled(false);
etAmount.setEnabled(false); etAmount.setEnabled(false);
bScan.setEnabled(false);
bPaymentId.setEnabled(false); bPaymentId.setEnabled(false);
bSweep.setEnabled(false); bSweep.setEnabled(false);
bPrepareSend.setEnabled(false); bPrepareSend.setEnabled(false);
@ -332,6 +333,7 @@ public class SendFragment extends Fragment {
etAddress.setEnabled(true); etAddress.setEnabled(true);
etPaymentId.setEnabled(true); etPaymentId.setEnabled(true);
etAmount.setEnabled(true); etAmount.setEnabled(true);
bScan.setEnabled(true);
bPaymentId.setEnabled(true); bPaymentId.setEnabled(true);
bSweep.setEnabled(true); bSweep.setEnabled(true);
bPrepareSend.setEnabled(true); bPrepareSend.setEnabled(true);

View File

@ -52,7 +52,7 @@
android:textSize="16sp" /> android:textSize="16sp" />
<Button <Button
android:id="@+id/bAddress" android:id="@+id/bScan"
android:layout_width="0sp" android:layout_width="0sp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"