locked
MasterDetail & Tabbed pages have unexpected results on Android RRS feed

  • Question

  • User43571 posted

    Hi! I just started out with the (awesome) Xamarin.Forms, but bumped into a problem yesterday that I can't seem to figure out.

    I created a MasterDetail page that contains two Menu options: One that links to a TabbedPage, another to a ContentPage . When opening this on iOS, everything seems to be working fine. Yet, when running this sample in Android, some strange behaviour occurs.

    When I open the Drawer (slide the page to the right), I expect the full Page to slide the right. On iOS, this is happening. Yet, on Android, the "Tabs" from the TabbedPage are still stuck on top. The ContentPage does seem to work fine; it's only the Tabs that are stuck in place.

    This is the code (very simplified):

    public class WrapperPage : MasterDetailPage
    {
        public WrapperPage ()
        {
            var menuItems = new List<MenuItem> ()
            {
                new MenuItem() { Title = "Tabbed Page", Page = new Tabbed() },
                new MenuItem() { Title = "Content Page", Page = new Content() }
            };
    
            // Code that creates a ListView for the .Master and
            // binds to the ItemSelected to change the .Detail
        }
    }
    
    public class Tabbed : TabbedPage
    {
        public Tabbed ()
        {
            this.Children.Add ( new TabOne() { Title = "One" } );
            this.Children.Add ( new TabTwo() { Title = "Two" } );
            // The Tabs are two simple ContentPages
        }
    }
    
    public class Content : ContentPage
    {
        public Content ()
        {
            // Simple label for the ContentPage
        }
    }
    

    I don't think I'm doing something wrong here (especially since it does seem to work on iOS), or do I just have different expectation?

    Attached:

    • ZIP archive with the project
    • Screenshot from iOS (tabs move to the right)
    • Screenshot from Android (tabs don't move to the right)
    Tuesday, June 17, 2014 7:11 AM

Answers

  • User352 posted

    This is expected behavior for now, we are investigating how to improve this in the future as it is obviously non-ideal to not be able to change this.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, February 20, 2015 6:38 PM

All replies

  • User62019 posted

    I'm having the same issue. Did you ever solve it?

    Tuesday, July 22, 2014 9:12 PM
  • User25759 posted

    Can you make sure that you update to the latest NuGet package. The latest releases follow the NavigationDrawer style for Android and no content will be pushed, it will just overlay on top of the page.

    Tuesday, July 22, 2014 10:03 PM
  • User62019 posted

    The new nuget package has the same issue.

    Thursday, July 24, 2014 4:23 PM
  • User70996 posted

    Any update on this issue? I'm having the same problem.

    Saturday, September 6, 2014 5:11 AM
  • User73207 posted

    I'm experiencing this too. Any updates?

    Friday, November 21, 2014 2:33 AM
  • User59362 posted

    I also think that there is a problem with tabs and masterdetail page on Android.

    Master Page should have been opened on top of tabs, instead it opens below.

    I upload a sample from Xamarin Evolve App. Here, master page should have hide the "All" and "Now" tabs.

    Saturday, December 20, 2014 8:47 AM
  • User96020 posted

    Is there any update on it ?

    Friday, December 26, 2014 10:28 AM
  • User3521 posted

    The same problem. I'm looking for updates, too.

    Saturday, December 27, 2014 1:09 PM
  • User73207 posted

    Bump. I deperately need these features playing well together. Any updates?

    Wednesday, January 7, 2015 5:21 AM
  • User24307 posted

    I would also very much need a update on this. XAMARIN?

    Tuesday, January 13, 2015 1:38 PM
  • User8493 posted

    Bump. The master menu needs to be on top of the tabs. Kinda silly this has been reported since June and not even responded to in depth by the forms team...

    Monday, February 16, 2015 8:38 PM
  • User52543 posted

    Yes that is true, hey Xamarin Team any solutions for this issue?

    Wednesday, February 18, 2015 6:58 PM
  • User21936 posted

    HI all,

    There actually is a bug report on this and according to our Forms team lead this is expected behavior. See: https://bugzilla.xamarin.com/show_bug.cgi?id=23484

    Last comment from Jason from above: "This is how the platform is designed to work when using a MasterDetailPage which maps to an Android DrawerLayout."

    Friday, February 20, 2015 1:11 AM
  • User352 posted

    This is expected behavior for now, we are investigating how to improve this in the future as it is obviously non-ideal to not be able to change this.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, February 20, 2015 6:38 PM
  • User73207 posted

    Sincere thanks for looking into this. It's the only thing keeping me from using tabbed pages.

    Tuesday, March 17, 2015 5:59 AM
  • User42807 posted

    Any updates?

    Wednesday, July 15, 2015 8:22 PM
  • User138795 posted

    wow. still not solutions for this ?

    Monday, July 27, 2015 9:55 AM
  • User142162 posted

    Can anybody provide update on this feature? Overlay drawer over the tabs

    Saturday, August 1, 2015 5:03 PM
  • User73207 posted

    One more bump. We still can't use TabbedPages because of this. We understand that it was designed this way, but we just need a way to override the overlap behavior and we can finally use them!

    Thanks for all you do Xamarin!

    Monday, August 3, 2015 4:29 PM
  • User46067 posted

    We are also desperate for this. Any news at all?

    It would be great to know what the feature/fix roadmap is with respect to Xamarin Forms so we can plan accordingly.

    Wednesday, August 5, 2015 11:05 AM
  • User146684 posted

    Hi guys, I guess we are looking at a dead end. This feature is not planned for release or its not in roadmap. According to Xamarin forms team this is a expected behaviour and so need to look for alternatives. Regards

    Tuesday, August 18, 2015 6:25 PM
  • User105524 posted

    I used custom tabs for masterdetails page. You can take a look in open source https://github.com/asthanarht/CPXamarin

    Tuesday, August 18, 2015 7:29 PM
  • User139205 posted

    Once again a one year old question with no roadmap or planning for an update.

    Wednesday, September 9, 2015 12:54 PM
  • User121216 posted

    Pretty funny, how this still has not been fixed. I guess Xamarin.Forms is not ready for production yet. Kinda sad.

    Tuesday, February 2, 2016 10:12 AM
  • User37696 posted

    Hello All,

    By implementing material design with FormsAppCompatActivity, I think you can get the results you want. Read more here.

    Tuesday, February 2, 2016 1:59 PM
  • User247494 posted

    yes having this problem still. anyway, is there any workaround?

    Thursday, September 8, 2016 7:24 AM
  • User219728 posted

    Same too =]], over two years.

    Monday, October 10, 2016 4:53 PM
  • User254962 posted

    GOOD . I want to create tabbed page in master detail page. Is do?

    Friday, October 21, 2016 7:36 AM
  • User235787 posted

    same too,anybody has a solution?

    Friday, October 28, 2016 2:14 AM
  • User181338 posted

    We are also having this problem on Android - tried to get the FormsAppCompatActivity example to work and I got inflation exceptions!

    Tuesday, November 8, 2016 4:35 PM
  • User284313 posted

    Hello,

    I guess that most people here have found a solution to this, but I just wanted to post my solution for future readers.

    Open .Droid\Resources\layout\Tabbar.axml Find app:tabMode and change it to "scrollable" (which is "fixed" by default).

    Clean/rebuild .Droid project and this should make tabbar scrollable.

    (VS 2015, Xamarin.Forms v2.3.3.180, Xamarin.Android.Support.* 23.3.0)

    Wednesday, February 22, 2017 6:49 PM
  • User152984 posted

    having this problem still.anybody has a solution?

    please any one can help me.

    Friday, March 3, 2017 3:39 AM
  • User152984 posted

    please any one can help me.i am struggling with this issue.

    Monday, March 6, 2017 7:02 AM
  • User127236 posted

    @SANDEEP_G Please, follows the James Montemagno post https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/

    It's work for me updatting my target to 6.0 and using the FormsAppCompatActivity

    Wednesday, March 15, 2017 4:01 PM