]> git.ktnx.net Git - mobile-ledger.git/commitdiff
new transaction: hide FAB on submit
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 09:07:19 +0000 (12:07 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 09:07:19 +0000 (12:07 +0300)
disabling changes the icon colour which is strange

app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionFragment.java

index e4ac7792eaa7579aa5ec756b909ef1913a9e8b53..e54e8d6115af6c42c6b07b7020263613b0f7d827 100644 (file)
@@ -114,7 +114,6 @@ public class NewTransactionFragment extends Fragment {
             throw new RSInvalidStateException(
                     "getActivity() returned null within onActivityCreated()");
 
-        list = activity.findViewById(R.id.new_transaction_accounts);
         viewModel = new ViewModelProvider(activity).get(NewTransactionModel.class);
         viewModel.observeDataProfile(this);
         mProfile = Data.profile.getValue();
@@ -131,7 +130,6 @@ public class NewTransactionFragment extends Fragment {
                      if (isSubmittable) {
                          if (fab != null) {
                              fab.show();
-                             fab.setEnabled(true);
                          }
                      }
                      else {
@@ -179,7 +177,7 @@ public class NewTransactionFragment extends Fragment {
 //                        p.setVisibility(View.VISIBLE);
 //
 //                }, 10);
-                        p.setVisibility(View.VISIBLE);
+                p.setVisibility(View.VISIBLE);
             }
             else
                 p.setVisibility(View.INVISIBLE);
@@ -193,7 +191,7 @@ public class NewTransactionFragment extends Fragment {
         outState.putInt("focused", focusedItem);
     }
     private void onFabPressed() {
-        fab.setEnabled(false);
+        fab.hide();
         Misc.hideSoftKeyboard(this);
         if (mListener != null) {
             SimpleDate date = viewModel.getDate();