0
votes

I'm using the bottom navigation that Xamarin Forms offers in new Xamarin.Forms nuget. I followed this guide (https://15mgm15.ghost.io/2018/06/06/bottom-tabbed-page-for-xamarin-forms-android/) The issue I'm having is that the tabs disappear when I navigate inside a tab.

This is the code I have:

<TabbedPage.Children>
    <local:Views.Page1 Title="Welcome" Icon="welcome"/>
    <local:Views.Page2 Title="My Account" Icon="acc"/>
    <local:Views.Page3 Title="Clothes" Icon="clothes"/>
    <local:Views.Page4 Title="Support" Icon="support"/>
    <local:Views.Page5 Title="About" Icon="about"/>
</TabbedPage.Children>

And this is in the code behind:

 InitializeComponent();
 On<Xamarin.Forms.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom);

I'm using PushAsync to get to pages inside tabs.

Appreciate all the help I can get, thanks!

3
Wrap your pages inside a NavigationPageAbsoluteSith
Can you show an example? @AbsoluteSithKalleP
Check this out.AbsoluteSith

3 Answers

1
votes
<local:TodayPage />
<NavigationPage Title="Schedule" Icon="schedule.png">
    <x:Arguments>
        <local:SchedulePage />
    </x:Arguments>
</NavigationPage>
0
votes

What version of Xamarin.Forms are you using. Please note that in the link you mentioned in your question they specifically say you should use this pre-release version of Xamarin Forms (v3.1.0.530888-pre2).

It would also help if you provide us with an example of what you mean with:

I'm using PushAsync to get to pages inside tabs.

0
votes

I have the same problem, and i found that the problem is using navigation in commands view model

await Application.Current.MainPage.Navigation.PushAsync(page);

try to navigate to the page you need from the direct event and you will get the tabs shown again,

If you have found a solution to use navigation inside commands and keeps tabs appears, please share it with us