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

Tabbed Pages in android are not working with new Xamarin Forms 1.4.4.6392

$
0
0

I hava a Tabbed page Inside a Navigation Page As Detail Of Master Details Page, Clicking on tabs doesn't work, it always shows the last page.

public class TestTabMasterDetailPage : MasterDetailPage
{
public TestTabMasterDetailPage ()
{
Icon = "icon.png";
Master = new Page{ Title = "Login" };

        var tabbedPage = new TabbedPage {
            Children = { new TabbedViews("First Tab") , new TabbedViews("Second Tab"), new TabbedViews("Third Tab")
            }
        };

        Detail = new TestTabNavigationPage(tabbedPage);
    }
}

public class TestTabNavigationPage : NavigationPage
{
public TestTabNavigationPage (Page root):base(root)
{
Icon = "icon.png";
}
}

public class TabbedViews : ContentPage
{
public TabbedViews (string name)
{
Title = name;
Label label = new Label () {
HorizontalOptions = LayoutOptions.End,
XAlign = TextAlignment.Center,
YAlign = TextAlignment.Center,
BackgroundColor = Color.White,
Text = "powered by " + name,
};

        var InsideStack = new StackLayout {
            Orientation = StackOrientation.Vertical,
            VerticalOptions = LayoutOptions.FillAndExpand,
            Children = { label }
        }; 

        Content = InsideStack;
    }


}

I am attaching the solution..


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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