From: Damyan Ivanov Date: Sat, 15 Aug 2020 09:07:19 +0000 (+0300) Subject: new transaction: hide FAB on submit X-Git-Tag: v0.15.0~72 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=47e8d44c9633c88fec1c3802157927652fe62e53;p=mobile-ledger.git new transaction: hide FAB on submit disabling changes the icon colour which is strange --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionFragment.java index e4ac7792..e54e8d61 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionFragment.java @@ -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();