I have a Tabbed page that allows the user to access a web service API using a search function. The page displays the search results into a listview. When the page loads, I have the code below to clear the previous search...
protected override void OnAppearing()
{
base.OnAppearing ();
if (_directorySearchViewModel.DirectoryItems.Count > 0) {
_directorySearchViewModel.DirectoryItems.Clear ();
searchBar.Text = "";
}
}
This works great on iOS, and OnAppearing override is called upon the page loading. However, on Android, after I updated to use FormsAppCompatActivity, this is no longer working. Upon some troubleshooting and debugging, I discovered that the Tab Page is calling the OpAppearing override for the next tab in the same direction, and OnDisappearing override for two tabs in the opposite direction.... Is this an intended behavior for android? Or am I going crazy and my codes are doing some magical voodoo that I am not aware of. I would not be surprise if this is purely user-error since it is around 1:00AM and I desperately need some sleep, but any help would be greatly appreciated.