Skip to content

Commit

Permalink
Merge pull request #32 from m2049r/bugfix_scanbutton
Browse files Browse the repository at this point in the history
fix scan button enable/disable
  • Loading branch information
m2049r authored Aug 31, 2017
2 parents 49e338e + 93ec386 commit e0439a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/java/com/m2049r/xmrwallet/SendFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -84,7 +84,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
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);
Expand Down Expand Up @@ -199,7 +199,7 @@ public void onClick(View v) {
}
});

bAddress.setOnClickListener(new View.OnClickListener() {
bScan.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
activityCallback.onScanAddress();
Expand Down Expand Up @@ -321,6 +321,7 @@ private void disableEdit() {
etAddress.setEnabled(false);
etPaymentId.setEnabled(false);
etAmount.setEnabled(false);
bScan.setEnabled(false);
bPaymentId.setEnabled(false);
bSweep.setEnabled(false);
bPrepareSend.setEnabled(false);
Expand All @@ -332,6 +333,7 @@ private void enableEdit() {
etAddress.setEnabled(true);
etPaymentId.setEnabled(true);
etAmount.setEnabled(true);
bScan.setEnabled(true);
bPaymentId.setEnabled(true);
bSweep.setEnabled(true);
bPrepareSend.setEnabled(true);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/send_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:textSize="16sp" />

<Button
android:id="@+id/bAddress"
android:id="@+id/bScan"
android:layout_width="0sp"
android:layout_height="wrap_content"
android:layout_gravity="center"
Expand Down

0 comments on commit e0439a1

Please sign in to comment.