]> git.ktnx.net Git - mobile-ledger.git/commitdiff
replace onActivityCreated (deprecated) with onViewCreated
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 28 Nov 2020 07:19:55 +0000 (09:19 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 28 Nov 2020 07:19:55 +0000 (09:19 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListFragment.java

index 5f4ffe57f2c4213188c526ceb311df6af03c6b54..9654f140f5739cdfe800e939e0eef4f535e24590 100644 (file)
@@ -67,9 +67,9 @@ public class AccountSummaryFragment extends MobileLedgerListFragment {
 
     @Override
 
-    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+    public void onViewCreated(@Nullable View view, @Nullable Bundle savedInstanceState) {
         debug("flow", "AccountSummaryFragment.onActivityCreated()");
-        super.onActivityCreated(savedInstanceState);
+        super.onViewCreated(view, savedInstanceState);
 
         MainModel model = new ViewModelProvider(requireActivity()).get(MainModel.class);
 
index 05b272e8a6d4f27a9577dac5b526c1ce27f83e6d..e705d1c102df4a01348d77b57ac118806e4fc13d 100644 (file)
@@ -106,8 +106,8 @@ public class NewTransactionFragment extends Fragment {
     }
 
     @Override
-    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
+    public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
+        super.onViewCreated(view, savedInstanceState);
         FragmentActivity activity = getActivity();
         if (activity == null)
             throw new RSInvalidStateException(
index 01c0143dcc4171c66ef1eed09d532d9527e54889..e4fa95aebc817576afe68deb37e77e43e3e8559f 100644 (file)
@@ -178,8 +178,8 @@ public class ProfileDetailFragment extends Fragment {
         });
     }
     @Override
-    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
+    public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
+        super.onViewCreated(view, savedInstanceState);
         Activity context = getActivity();
         if (context == null)
             return;
index fdb54849f7de0b351a190b537ab80db7b313bb58..4ab877dba7dbd4c158bfc7f00b445cd58941fa14 100644 (file)
@@ -89,9 +89,9 @@ public class TransactionListFragment extends MobileLedgerListFragment
         debug("flow", "TransactionListFragment.onPause()");
     }
     @Override
-    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+    public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
         debug("flow", "TransactionListFragment.onActivityCreated called");
-        super.onActivityCreated(savedInstanceState);
+        super.onViewCreated(view, savedInstanceState);
 
         Data.backgroundTasksRunning.observe(getViewLifecycleOwner(),
                 this::onBackgroundTaskRunningChanged);
@@ -129,7 +129,7 @@ public class TransactionListFragment extends MobileLedgerListFragment
         accNameFilter = mainActivity.findViewById(R.id.transaction_filter_account_name);
 
         MLDB.hookAutocompletionAdapter(mainActivity, accNameFilter, "accounts", "name");
-        accNameFilter.setOnItemClickListener((parent, view, position, id) -> {
+        accNameFilter.setOnItemClickListener((parent, v, position, id) -> {
 //                debug("tmp", "direct onItemClick");
             Cursor c = (Cursor) parent.getItemAtPosition(position);
             model.getAccountFilter()