dewango / BottomNavigationBarXF

Bottom Navigation Bar for Xamarin Forms
MIT License
187 stars 97 forks source link

[Bug] OnAppearing method is calling twice #63

Open AlirezaAkbarix opened 7 years ago

AlirezaAkbarix commented 7 years ago

Also in the example project, when you override OnAppearing method, after clicking on bottom navigation menus and changing the TabPage, you can see OnAppearing is calling twice!

I call my ViewModel's LoadData inside OnAppearing method that is responsible to get data from rest API and load views, so that calling OnAppearing twice, can cause performance issue.

AlirezaAkbarix commented 7 years ago

I should notice that Calling methods is like this: 1- OnAppearing 2- OnDisappearing 3- OnAppearing

and then page is shown completely. so that we cannot use a bool to handle this issue.

15mgm15 commented 7 years ago

@AlirezaAkbarix Did you found a solution to this?

AlirezaAkbarix commented 7 years ago

@15mgm15 Not yet, but I thing the only approach is to use timer to execute the loader after about 1s.

angelru commented 7 years ago

Hello,

I have the same issue, I believe that it's issue the TabbedPage. (bug xamarin) https://forums.xamarin.com/discussion/101000/possible-bug-tabbed-page