I am wondering if it's possible to differentiate between a swipe and a click on the BottomNavigationView in Xamarin.Android.
I've implemented:
void NavigationView_NavigationItemSelected(object sender, BottomNavigationView.NavigationItemSelectedEventArgs e)
{
if (_viewPager.CurrentItem == 0)
{
_fm1.Pop2Root();
}
_viewPager.SetCurrentItem(e.Item.Order, true);
}
but there is no differentiation between a swipe and a click. I want to keep the current page loaded if the user swipes, but pop to the root if the user has clicked on the currently selected BottomNavigationView tab.
And here's what my Pop2Root method looks like (not that it really matters):
public void Pop2Root()
{
_wv.LoadUrl("https://www.bitchute.com/");
}
I just want a separate event for click versus swipe.
I'm not looking for anyone to do my work. I will post the full solution (as always) once I've figured it out. What I'm looking for is a yes or no answer whether or not it's possible; then I'll take care of the rest. I've implemented a click listener on the TabHost before, but that's a completely different UI element:
https://github.com/hexag0d/BitChute_Mobile_Android_a2/blob/2.7641/Activities/ClickListeners.cs
If you would like more context on the complete project, here's the MainActivity.cs then you can back into the rest:
https://github.com/hexag0d/BitChute_Mobile_Android_BottomNav/blob/master/MainActivity.cs
Thanks, in advance