From 47e8d44c9633c88fec1c3802157927652fe62e53 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 15 Aug 2020 12:07:19 +0300 Subject: [PATCH] new transaction: hide FAB on submit disabling changes the icon colour which is strange --- .../mobileledger/ui/activity/NewTransactionFragment.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); -- 2.39.5