Forum Xamarin.Forms

Orientation issue in xamarin android

jebaseelanthiyagarajanjebaseelanthiyagarajan USMember ✭✭
edited May 2019 in Xamarin.Forms

Problem Solvers,
I'm Stuck with the orientation issue once i placed the content views inside below structure.

Root : CarouselPage
Child : TabView
TabView Child : ContentPage
Content Page Child : ContentViews

In below a attached images Yellow Color I used for ScrollView and Green color Used for StackLayout. App works in a portrait mode. On iOS It works fine even in landscape view.

Best Answer


  • YelinzhYelinzh Member, Xamarin Team Xamurai
    edited May 2019

    I've written a basic sample based on the information you provided and it works well when rotating the screen. As the image shows:

    Please post the code of ContentViews. Or would you mind sharing a basic demo? It'll help to reproduce the issue and get a solution.

  • <ContentView.Content>
            <StackLayout Padding="2" Margin="2,10,5,2">
                <StackLayout x:Name="ctrlStackHeader">    ----> Run Time I'm adding the Controls
                <StackLayout x:Name="ctrlStackImage">
                <StackLayout x:Name="ctrlStackData">
                    <Button x:Name="ctrlBtnProceed" Text="Proceed" Clicked="Proceed"/>
                    <Button x:Name="ctrlBtnReset" Text="Clear" Clicked="ClearValues"/>

  • YelinzhYelinzh Member, Xamarin Team Xamurai
    edited May 2019

    What's the TabView? A plugin? I use Xam.Plugin.TabView to deploy the code and it works well.


    public View1()
        ctrlStackHeader.Children.Add(new Label { Text = "ctrlStackHeader" });
        ctrlStackImage.Children.Add(new Image { Source = "grid_" });
        ctrlStackData.Children.Add(new ListView
            ItemsSource = new List<string>
                { "mono","monodroid","monotouch","monorail","monodevelop",

  • i tried again, sill same issue exists.

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    Would you mind sharing a basic demo?

  • yes I will share the basic demo

  • hi this is the sample demo app. i posted it in the git hub public repository. kindly give solution for my problem. Thanks in advance.

  • Hi Friend, We are really happy about your effort on fixing our issue. Thanks for this Great Solution. It is Greatly helping in our development process.

Sign In or Register to comment.