Orientation issue in xamarin android

jebaseelanthiyagarajanjebaseelanthiyagarajan USMember ✭✭
edited May 21 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

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited May 21

    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.

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

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited May 22


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

    view.xaml.cs

    public View1()
    {
        InitializeComponent();
        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",
                "monotone","monopoly","monomodal","mononucleosis",
                }
        });
    }
    

  • jebaseelanthiyagarajanjebaseelanthiyagarajan USMember ✭✭

    i tried again, sill same issue exists.

  • JarvanJarvan Member, Xamarin Team Xamurai

    Would you mind sharing a basic demo?

  • jebaseelanthiyagarajanjebaseelanthiyagarajan USMember ✭✭

    yes I will share the basic demo

  • jebaseelanthiyagarajanjebaseelanthiyagarajan USMember ✭✭

    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.
    https://github.com/jebaseelan10/TabView.git

  • jebaseelanthiyagarajanjebaseelanthiyagarajan USMember ✭✭

    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.