xamarin/Xamarin.Forms

[Bug] Can't display element above a button in a ScrollView

Aperta

#7375 aperta il 4 set 2019

 (1 commento) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
4.1.0e/3 :clock3:help wantedi/regressionp/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

I have a ScrollView with a StackLayout to add a list of elements. In this list is a grid with a button and a text or an image which should lay over the button. In my concrete case I have a button to select something and a cancel image to reset the selection. This issue only appears with Xamarin Forms versions greater than 4.1.0.581479.

Steps to Reproduce

  1. Start Application
  2. Select Item in list
  3. See the issue appear

(Note if you make any change, please make sure you delete bin and obj folder.)

Expected Behavior

The Label should be above the button in all cases.

Actual Behavior

On the current version the label is below the button when the StackLayout is nested in a ScrollView

Basic Information

  • Version with issue: 4.1.0.618606 and above

  • Last known good version: 4.1.0.581479.

  • IDE: Visual Studio

  • Platform Target Frameworks:

    • iOS:
    • Android: Android 9
    • UWP:
  • Android Support Library Version:

  • Nuget Packages:

  • Affected Devices:

Screenshots

With Xamarin Forms 4.1.0.581479 it is displayed correctly as follows: image

As soon as I update to a newer version of Xamarin Forms the text is behind the button: image

Interestingly as soon as I remove the ScrollView it works again properly with the current version: image

Reproduction Link

App1.zip

Guida contributor