From 7797ca320543b821f15af0d35c5ee8faeccefa7f Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sat, 15 May 2021 07:38:00 +0900 Subject: [PATCH] BottomNavBar: update deprecated method calls --- .../java/awais/instagrabber/utils/NavigationExtensions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java b/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java index a6bccbfd..bc0f3cb4 100644 --- a/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java +++ b/app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java @@ -63,7 +63,7 @@ public class NavigationExtensions { selectedItemTag = graphIdToTagMap.get(bottomNavigationView.getSelectedItemId()); final String firstFragmentTag = graphIdToTagMap.get(firstFragmentGraphId); isOnFirstFragment = selectedItemTag != null && selectedItemTag.equals(firstFragmentTag); - bottomNavigationView.setOnNavigationItemSelectedListener(item -> { + bottomNavigationView.setOnItemSelectedListener(item -> { if (fragmentManager.isStateSaved()) { return false; } @@ -169,7 +169,7 @@ public class NavigationExtensions { private static void setupItemReselected(final BottomNavigationView bottomNavigationView, final SparseArray graphIdToTagMap, final FragmentManager fragmentManager) { - bottomNavigationView.setOnNavigationItemReselectedListener(item -> { + bottomNavigationView.setOnItemReselectedListener(item -> { final String newlySelectedItemTag = graphIdToTagMap.get(item.getItemId()); final Fragment fragmentByTag = fragmentManager.findFragmentByTag(newlySelectedItemTag); if (fragmentByTag == null) {