locked
StackLayout duplicates last one/two children below when layout changes on Android in Forms 1.2/3 RRS feed

  • Question

  • User16203 posted

    I have a StackLayout

            var stack = new StackLayout ();
            stack.Padding = new Thickness (10);
    
            stack.Children.Add (this.firstTextBox);
            stack.Children.Add (this.spacer1);
            stack.Children.Add (this.secondTextBox);
            stack.Children.Add (this.spacer2);
            stack.Children.Add (this.thirdTextBox);
    

    I call a method asynchronously, when control comes back it updates the text. If the text grows, e.g.

                this.firstTextBox.Text = "First text box First text box First text box First text box First text box First text box First text box First text box First text box ";
                this.secondTextBox.Text = "Second text box Second text box Second text box Second text box Second text box Second text box Second text box ";
                this.thirdTextBox.Text = "Third text box";
    

    Then the display shows the ThirdText box twice on screen, once much lower on the screen.

    This happens with Xamarin Forms 1.2 and the pre-release of 1.3 on Android L but does not happen on iOS.

    Monday, November 24, 2014 7:14 AM

All replies

  • User16203 posted

    FYI for anyone else seeing this, it appears to be an Android L / Nexus 5 issue only. It affects even a single ListView on a page.

    Simplest repro is a NavigationPage holding a ContentPage holding a ListView.

        public App()
        {
            MainPage = new NavigationPage(
                new ContentPage { 
                    Content = new ListView { ItemsSource = Enumerable.Range(1, 200).Select(x => x.ToString()) }
            });
        }
    

    In landscape mode random noise sometimes appears on screen.

    It does not repro in the emulator running Android L and it does not repro on 4.4.

    Anyone else seeing this?

    Saturday, November 29, 2014 2:43 AM
  • User88979 posted

    I am. Do you know if there is any way around this or a bug fix coming?

    Saturday, November 29, 2014 3:14 AM
  • User32886 posted

    I have got the same problem too, I am using nexus 4. S5 looks okay. Guess it's not ready for prime time yet.

    Sunday, November 30, 2014 9:32 AM
  • User75222 posted

    Nexus 5, same issue

    Saturday, December 6, 2014 2:56 PM
  • User85793 posted

    My app suffers the same problem on Nexus 5.

    Saturday, December 6, 2014 3:39 PM
  • User88161 posted

    Same problem here. Xamarin should take this in serious consideration..

    Sunday, December 7, 2014 12:54 PM
  • User58655 posted

    +1 Nexus 5 / Android 5

    Sunday, December 7, 2014 2:44 PM
  • User54080 posted

    I am also facing same issue, did any one resolved this issue?

    Tuesday, December 9, 2014 1:15 PM
  • User12817 posted

    Hi all!

    I do know there are a few outstanding issues with Xamarin.Forms and Lollipop that are currently in the works, so this might be an issue that can be resolved by a future version of Xamarin.Forms.

    For the time being, I've reported a bug on this issue that you can find here:

    https://bugzilla.xamarin.com/show_bug.cgi?id=25203

    Please provide any further detail and/or reproductions on the bug report so we can investigate further and provide a fix.

    Thanks!

    Tuesday, December 9, 2014 8:32 PM
  • User16203 posted

    Xamarin.Forms 1.3.0 Prerelease 2 seems to have fixed this problem. Thanks!

    Wednesday, December 10, 2014 1:37 AM