1

I upgrade my Xamarin Android to API 30 and began getting errors with the old code below that implements SetOnNavigationItemSelectedListener. I am now trying to implement the new SetOnItemSelectedListener, but do not know how too. Any ideas?

bottomNavigation = FindViewById<BottomNavigationView>(Resource.Id.navigation);                         
                    bottomNavigation.SetOnNavigationItemSelectedListener(this);
                    bottomNavigation.NavigationItemSelected += Navigation_NavigationItemSelected;
Blackie
  • 141
  • 2
  • 10

1 Answers1

0

To use the new BottomNavigationVIew in Xamarin.Google.Android.Material -Version 1.4.0.4 use the IOnItemSelectedListener Interface on your class then use the code below.

    bottomNavigation = (BottomNavigationView)FindViewById(Resource.Id.bottom_navigation);

bottomNavigation.ItemSelected += BottomNavigation_ItemSelected;
Blackie
  • 141
  • 2
  • 10