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

Tabbed Page Inside Master Detail

$
0
0

Hi, I have a MasterDetail page with a default content page.
This page calls a Tabbed Page that contains an icon to go back to the default content page.

My Tabbed Page is:

`public class teste : MyTabbed
{
int cont = 0;
public teste()
{
NavigationPage.SetHasNavigationBar(this, false);

        this.ForeColor = Color.Green;

        Children.Add(new IconNavigationPage(new MainApps())
        {
            Icon = "fa-home",
            Title = "HOME",
            BarBackgroundColor = (Color)App.Current.Resources["verdeRiopele"],
            BarTextColor = Color.White
        });

        IconNavigationPage paginaKit = new IconNavigationPage(new Kit.Home())
        {
            Icon = "icon-layers",
            Title = "Kit",
            BarBackgroundColor = (Color)App.Current.Resources["verdeRiopele"],
            BarTextColor = Color.White
        };

        Children.Add(paginaKit);

        this.CurrentPage = paginaKit;
    }

    protected override void OnCurrentPageChanged()
    {
        base.OnCurrentPageChanged();

        var current = (IconNavigationPage)this.CurrentPage;
        if (cont == 1 && current.CurrentPage is MainApps)
        {

            //App.masterPage.SelecionarItem(typeof(MainApps));

            App.PaginaPrincipal.Detail = new IconNavigationPage(new MainApps())
            {
                BarBackgroundColor = (Color)App.Current.Resources["verdeRiopele"],
                BarTextColor = Color.White
            };
            App.masterPage.ListView.SelectedItem = null;
            App.PaginaPrincipal.IsPresented = false;

            cont = 1;
        }
        else
        {
            cont = 1;
        }
    }
}`

Im setting the second page as the initial page.
On CurrentPage I call the method to change the detail from the master. In iOS it works. But on Android it gives me this error:

FragmentManager is already executing transactions

im using bottom bar renderer in android.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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