I am new to Xamarin how to create a Tabs in my application.Give me some Sample code

How to Create android slidingtablayout any example

Answers

  • SathisRamSathisRam USMember

    I am Using Visual studio 2015 for android App having 3 tabs needs to slide.
    I've been looking for a simple way to have sliding tabs in my Xamarin Android application.I have already tried Actionbar tabs Could not get sample working,I have tried.
    Any help would be greatly appreciated!

  • NMackayNMackay GBInsider, University mod

    It won't slide with three tabs though on most devices. Once you start adding 4-5 tabs you can swipe the tab area (assuming your tabs don't have a single character title).

    Not sure what you mean by slide otherwise

  • SathisRamSathisRam USMember

    @Norman Mackay I need to create Tabbed layout in my application having 4 pages or guide me how to use Material Pager Sliding Tab Strip

  • NMackayNMackay GBInsider, University mod

    @SathisRam

    This will create a page with 4 tabs.

    <?xml version="1.0" encoding="utf-8"?>
    
    <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:Class="Foobar.MyTabbedPage">
        <TabbedPage.Children>
    
            <ContentPage Title="Tab 1">
                <Label Text="Page 1" />
            </ContentPage>
    
            <ContentPage Title="Tab 2">
                <Label Text="Page 2" />
            </ContentPage>
    
            <ContentPage Title="Tab 3">
                <Label Text="Page 3" />
            </ContentPage>
    
            <ContentPage Title="Tab 4">
                <Label Text="Page 4" />
            </ContentPage>
        </TabbedPage.Children>
    </TabbedPage>
    
  • SathisRamSathisRam USMember

    Can You Share me a sample project in Android where I need to navigate from one page to an another page as in the image

Sign In or Register to comment.