Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Navigating to one of the tab in my Xamarin Forms app is flickering and then the apps shut down.

$
0
0

Navigating to one of the tab in my Xamarin Forms app is flickering and then the apps shut down. Please help

public partial class SoccerDailyStatus : ContentPage
{
private SQLiteConnection conn;
SoccerAvailability status;

    public SoccerDailyStatus(SoccerAvailability soccerStatus)
    {
        InitializeComponent();
        conn = DependencyService.Get<Isqlite>().GetConnection();
        conn.CreateTable<SoccerAvailability>();
        status = soccerStatus;
        BindingContext = status;

    }

    protected override async void OnAppearing()
    {
        base.OnAppearing();
        await DisplaySoccerStatus();
    }
    async Task DisplaySoccerStatus()
    {

        List<SoccerAvailability> myList = (from x in conn.Table<SoccerAvailability>() select x).ToList();

        if (myList != null)
        {
            SoccerAvailability soccerAvailability = new SoccerAvailability();
            soccerAvailability.SoccerStatus = myList[0].SoccerStatus;
            soccerAvailability.CurrentDate = DateTime.Now.ToString("ddMMyyyy"); 
            await Navigation.PushAsync(new SoccerDailyStatus(soccerAvailability) { });
        }
        else
        {
            await DisplayAlert("Notification", "Unable to proccess status", "Cancel");
        }


    }


}

Viewing all articles
Browse latest Browse all 77050

Trending Articles



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