Bug 60345 - On Forms Preview 3 (3.0.0.100-embeddingpreview), Adding TabbedPage as an Embedded forms fragment doesn't show tabs.
Summary: On Forms Preview 3 (3.0.0.100-embeddingpreview), Adding TabbedPage as an Embe...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-24 12:34 UTC by steve
Modified: 2017-11-14 00:27 UTC (History)
3 users (show)

Tags: embedding, tabbedpage, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Example app (33.88 KB, application/x-zip-compressed)
2017-10-24 12:34 UTC, steve
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60345 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description steve 2017-10-24 12:34:49 UTC
Created attachment 25417 [details]
Example app

I have an example Android app that has a single Activity, and just does the following:

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            Forms.Init(this,null);

            var p = new TabbedPage(); 
            p.Children.Add(new ContentPage() { BackgroundColor = Color.Red });
            p.Children.Add(new ContentPage() { BackgroundColor = Color.Blue});
            var f =  p.CreateFragment(this);


            Android.App.FragmentTransaction ft = FragmentManager.BeginTransaction();
            ft.AddToBackStack(null);
            ft.Replace(Resource.Id.frame, f, "testFrag");
            ft.Commit();
        }

All that is shown in the Fragment is the red-background of the first tab, but the tab bar at the top doesn't show at all.  Doing the same thing in a pure Forms app by setting the MainPage as follows does work as expected, with a tab bar at the top, and two pages that can be switched between:

            var p = new TabbedPage(); ;
            p.Children.Add(new ContentPage() { BackgroundColor = Color.Red });
            p.Children.Add(new ContentPage() { BackgroundColor = Color.Blue});
            MainPage = p;

I've attached an example project showing the problem.

I appreciate this is still in Preview, but would be useful to know whether support for this page will be coming in the final build.