Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

TabbedPage - OnAppearing called twice in android

$
0
0

Hello,

We have a TabbedPage layout and our app makes the web service call in the OnAppearing of the tab page. The OnAppearing event is called properly in iOS but in Android we are observing that the OnAppearing gets called twice. Due to this behaviour we are having problem making proper endpoint call in the onAppearing for android.

I can see that this is an issue reported in BugZilla but I dont see any proper resolution on the issue. https://bugzilla.xamarin.com/show_bug.cgi?id=44211

This is really annoying as one way or other we are dependent on the onAppearing method. We tried to add some local variables to make sure the function gets called only once like so.

constructor()
{
.....
 called = false;
}

protected override void OnAppearing()
{
    if(!called){
        ....
        called = true;
    }
}

With this method onAppearing does not get triggered after the first time. ( Not getting called on further change of tabs )

Is there any better way to do this? Also any update on the issue would also be helpful.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>