In my Xamarin Forms
application I am having Tabbed Page
as first Detail page
of Master Details Page
. So, while running my Droid
application it is showing empty
blank screen for few seconds and after that it is showing the correct Tabbed Page
. However, if I run the same project in iOS
it is not showing any Empty
or blank
screen; Tabbed page is rendering fast.
What I have tried
If I set any other normal Content Page
as first Detail page
instead of Tabbed Page
means that page is rendering fast in Droid
and also I have tried after updating the Xamarin.Forms
from v2.5.1.444934 to v3.1.0.697729 but no luck.
So, I confirmed that the Empty or Blank
screen is showing in Droid App
for few seconds because of Tabbed Page
. Is there any work around to resolve the problem. Thanks in advance.
Login.cs
MasterDetailPage masterDetail = new MasterDetail();
masterDetail.IsPresented = false;
Application.Current.MainPage = masterDetail;
using the above code in Login.cs
after successful of Login API
MasterDetail.xaml
<?xml version="1.0" encoding="UTF-8"?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Test.MasterDetail" IsPresented="false">
<MasterDetailPage.Master>
<local:MasterPage x:Name="masterPage"/>
</MasterDetailPage.Master>
</MasterDetailPage>
MasterDetail.xaml.cs
public partial class MasterDetail : MasterDetailPage
{
public MasterDetail()
{
InitializeComponent();
Detail = new NavigationPage(new BottomTabbedPage());
}
}
BottomTabbedPage.xaml.cs
public class BottomTabbedPage : TabbedPage
{
public BottomTabbedPage()
{
//setting false to hide navigation bar
NavigationPage.SetHasNavigationBar(this, false);
Children.Clear();
var map = new NavigationPage(new ConsumerMap());
map.Icon = "map_icon";
map.Title = ""Home;
Children.Add(map);
var order = new NavigationPage(new Order());
order.Icon = "order_icon";
order.Title = ""Order;
Children.Add(order);
var history = new NavigationPage(new History());
history.Icon = "history_icon";
history.Title = "History";
Children.Add(history);
}
}
BottomTabbedPage.xaml.cs
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Test.BottomTabbedPage">
</TabbedPage>