1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-26 22:56:58 +00:00

BottomNavBar: update deprecated method calls

This commit is contained in:
Ammar Githam 2021-05-15 07:38:00 +09:00
parent 988033f5fd
commit 7797ca3205

View File

@ -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<String> 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) {