Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [iOS] UI colour issue when using Xamarin.Forms 5.0.0.2196 #14881

Open
MerrickDigital opened this issue Nov 13, 2021 · 1 comment
Open
Assignees
Labels
a/collectionview s/unverified New report that has yet to be verified t/bug 🐛
Projects

Comments

@MerrickDigital
Copy link

MerrickDigital commented Nov 13, 2021

Description

This could be related to: #14755 & #13323

I had to update the Xamarin.Forms NuGet as I was experiencing the same issue in the above link when building for iOS with the latest XCode version. The latest version resolved the tabbar colour issue, however, in doing so I seem to have experienced a new issue with white font / invisible components within a CollectionView

Steps to Reproduce

  1. Create a CollectionView and bind to an ObservableCollection of Items. with Xamarin.Forms 4.8.0.1821 and deploy to iOS 15.0 simulator - observe the correct appearance where in the below the font is readable and Items are readable. I use the below for an as-you-type list of Items populating a view.

<RefreshView x:DataType="local:AViewModel" IsVisible="{Binding IsStopVisibleEndPoint, Mode=TwoWay}" Command="{Binding LoadItemsCommand}" >
                    <CollectionView HeightRequest="{Binding startHeightEndPoint}"  x:Name="ItemsListViewEnd"
                ItemsSource="{Binding ItemsEndSearch}"
                SelectionMode="None">
                        <CollectionView.ItemTemplate>
                            <DataTemplate>
                                <StackLayout  Padding="10" x:DataType="model:Item">
                                    <Label Text="{Binding Text}" 
                            LineBreakMode="NoWrap" 
                            Style="{DynamicResource ListItemTextStyle}" 
                            FontSize="16" />
                                    <Label Text="{Binding Description}" 
                            LineBreakMode="NoWrap"
                            Style="{DynamicResource ListItemDetailTextStyle}"
                            FontSize="13" />
                                    <StackLayout.GestureRecognizers>
                                        <TapGestureRecognizer 
                                NumberOfTapsRequired="1"
                                Command="{Binding Source={RelativeSource AncestorType={x:Type local:AViewModel}}, Path=ItemTappedEndPoint}"		
                                CommandParameter="{Binding .}">
                                        </TapGestureRecognizer>
                                    </StackLayout.GestureRecognizers>
                                </StackLayout>
                            </DataTemplate>
                        </CollectionView.ItemTemplate>

                    </CollectionView>
                </RefreshView>
  1. Upgrade the Xamarin.Forms NuGet to 5.0.0.2196 and build & deploy. Now no items are readable in the collectionview as the font is somehow white on a white background. As mentioned I use this for an as-you-type search result so I know there are Items in the view as the height of the Collection looks about correct - just the labels are not readable.

  2. Downgrade the nuget again and it works fine.

Expected Behavior

The items within the collectionview should not change appearance when the Xamarin.Forms nuget is upgraded. This only affects iOS. The UI in Android looks the same between versions

Actual Behavior

Xamarin.Forms version 5.x changes the appearance of the labels within the CollectionView (white font on a white background)

Basic Information

  • Version with issue: Xamarin.Forms 5.0.0.2196
  • Last known good version: Xamarin.Forms 4.8.0.1821
  • Platform Target Frameworks:
    • iOS: 15.0
    • Android: 9.0
  • NuGet Packages: Xamarin.Forms 5.0.0.2196

Environment

Same issue with both Visual Studio for Mac and Visual Studio on Windows - I have tried both

Build Logs

Screenshots

Cannot provide a screenshot but in XF 5.x its just a white collectionview. In the unaffected version, it is labels within the collectionview of black font on a white background. Android has has the correct appearance in both versions, iOS has the issue.

Reproduction Link

Workaround

No workaround so far

@MerrickDigital MerrickDigital added s/unverified New report that has yet to be verified t/bug 🐛 labels Nov 13, 2021
@MerrickDigital
Copy link
Author

[Assert] negative or zero item sizes are not supported in the flow layout

A little more debugging and this is the message in the application output of the iOS simulator. No problems at all with the same code in the Android sim.

@jsuarezruiz jsuarezruiz self-assigned this Nov 15, 2021
@jsuarezruiz jsuarezruiz added this to New in Triage via automation Nov 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview s/unverified New report that has yet to be verified t/bug 🐛
Projects
Triage
  
New
Development

No branches or pull requests

2 participants