From 648c267c7097c7e00a77af48d31cc5fd892e01fc Mon Sep 17 00:00:00 2001 From: Alexander Wilde Date: Sun, 3 Sep 2017 00:11:19 +0100 Subject: [PATCH] Save should be enabled without nfc. Set main activity buttons as disabled by default. --- .../hiddenramblings/tagmo/MainActivity.java | 3 +- app/src/main/res/layout/activity_main.xml | 33 ++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/hiddenramblings/tagmo/MainActivity.java b/app/src/main/java/com/hiddenramblings/tagmo/MainActivity.java index 39a13fc24..6c7d6990f 100644 --- a/app/src/main/java/com/hiddenramblings/tagmo/MainActivity.java +++ b/app/src/main/java/com/hiddenramblings/tagmo/MainActivity.java @@ -364,9 +364,10 @@ public void onDismissed(Snackbar snackbar, int event) { btnScanTag.setEnabled(nfcEnabled); btnWriteTagAuto.setEnabled(nfcEnabled && hasKeys && hasTag); btnRestoreTag.setEnabled(nfcEnabled && hasTag); - btnSaveTag.setEnabled(nfcEnabled && hasTag); + btnSaveTag.setEnabled(hasTag); btnShowQRCode.setEnabled(hasTag); btnEditDataSSB.setEnabled(hasKeys && hasTag); + btnEditDataTP.setEnabled(hasKeys && hasTag); btnViewHex.setEnabled(hasKeys && hasTag); int ssbVisibility = View.GONE; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 2c1a9c322..2e5740e16 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -40,7 +40,8 @@ android:layout_width="@dimen/main_buttons_width" android:layout_height="wrap_content" android:layout_alignParentRight="true" - android:text="Scan Tag"/> + android:text="Scan Tag" + android:enabled="false"/>