Bug 40421 - MasterDetail.Detail not rendering controls properly when using Maps inside TabbedPage
Summary: MasterDetail.Detail not rendering controls properly when using Maps inside Ta...
Status: RESOLVED DUPLICATE of bug 36662
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-04-15 00:20 UTC by Fulvio
Modified: 2016-06-09 23:43 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Without GoogleMap loaded (56.12 KB, image/png)
2016-04-15 00:20 UTC, Fulvio
ListView without GoogleMap loaded (74.23 KB, image/png)
2016-04-15 00:21 UTC, Fulvio
With GoogleMap loaded (425.67 KB, image/png)
2016-04-15 00:22 UTC, Fulvio

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Fulvio 2016-04-15 00:20:30 UTC
Created attachment 15730 [details]
Without GoogleMap loaded

I have the following MainActivity.cs class:

Xamarin.Forms.Forms.Init(this, bundle);
Xamarin.FormsMaps.Init(this, bundle);
FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar;
FormsAppCompatActivity.TabLayoutResource = Resource.Layout.tabs;
ViewerApplication a = new ViewerApplication();
App = a;
ViewerApplication.cs class:

public class ViewerApplication : Application, IMapApplication, IJobApplication
    // The root page of your application
    this.MainPage = new MapManagerPage();


<?xml version="1.0" encoding="UTF-8"?>
            <FileImageSource x:Key="EntitiesIcon" File="searchtoolbar.png" />
            <FileImageSource x:Key="FieldJobsIcon" File="browserwindowstoolbar.png" />
            <FileImageSource x:Key="PlacesIcon" File="maptoolbar.png" />
            <FileImageSource x:Key="LayersIcon" File="layers2toolbar.png" />
        <TabbedPage x:Name="Tabs" Title="Detail">
                <NavigationPage Title="Features" Icon="{StaticResource EntitiesIcon}">
                        <app:EntityPage x:Name="EntityPage" Title="Search" Icon="{StaticResource EntitiesIcon}" />
                <NavigationPage Title="Field Jobs" Icon="{StaticResource FieldJobsIcon}">
                        <app:FieldJobsPage x:Name="FieldJobsPage" Title="Field Jobs" Icon="{StaticResource FieldJobsIcon}" />
                <NavigationPage Title="Places" Icon="{StaticResource PlacesIcon}">
                        <app:PlacesPage x:Name="PlacesPage" Title="Places" Icon="{StaticResource PlacesIcon}" />
                <NavigationPage  Title="Layers" Icon="{StaticResource LayersIcon}">
                        <app:LayerPage x:Name="LayerPage" Title="Layers" Icon="{StaticResource LayersIcon}" />
        <NavigationPage Title="Map">
                <app:MapPage Title="Map" />

MapPage.xaml (which is the MasterDetailPage.Detail above):

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Platform.Gui.Forms.Views.MapPage">
            <FileImageSource x:Key="SettingsIcon" File="geartoolbar.png"/>
            <FileImageSource x:Key="LocateIcon" File="locationtoolbar.png"/>
            <FileImageSource x:Key="HelpButton" File="questiontoolbar.png"/>
        <ToolbarItem x:Name="SettingsButton" Icon="{StaticResource SettingsIcon}" Order="Default"/>
        <ToolbarItem x:Name="LocateButton" Icon="{StaticResource LocateIcon}" Order="Default"/>
        <ToolbarItem x:Name="HelpButton" Icon="{StaticResource HelpButton}" Order="Default"/>

MapPage.xaml.cs class (this is how I'm rendering the map):

DroidMap map = new DroidMap(MapSpan.FromCenterAndRadius(new Position(-37.814107, 144.814107), Distance.FromMiles(0.3)))
    IsShowingUser = true,
    HeightRequest = 100,
    WidthRequest = 960,
    VerticalOptions = LayoutOptions.FillAndExpand

Content = _droidMap;

See attachments to see what happens if I don't load the Google Map (Attachment: Without GoogleMap loaded).
Comment 1 Fulvio 2016-04-15 00:21:22 UTC
Created attachment 15731 [details]
ListView without GoogleMap loaded
Comment 2 Fulvio 2016-04-15 00:22:17 UTC
Created attachment 15732 [details]
With GoogleMap loaded

And then this is what happens when I do load the map (notice the search bar appearing over the map?).
Comment 3 Fulvio 2016-04-15 00:23:59 UTC
When the map is loaded none of the ListView controls work at all in Master, it also throws exceptions when I tap around in that section

When the GoogleMap is loaded you can't scroll the map below that strangely rendered search control.

Any help would be appreciated as to how to fix this issue. I've tried setting the DroidMap to a StackLayout rather than Content and it has the same issue as well as playing around with Horizontal and Vertical options.
Comment 4 Rui Marinho 2016-04-19 11:53:52 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue, we would very much appreciate it. 

For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team
Comment 5 Samantha Houts [MSFT] 2016-06-09 23:43:17 UTC
marking as duplicate, as this seems to have the same root cause.

*** This bug has been marked as a duplicate of bug 36662 ***