Xamarin.forms: ListView Selection Color disappeared on ios 13

Created on 7 Oct 2019  Â·  6Comments  Â·  Source: xamarin/Xamarin.Forms

Description

Steps to Reproduce

  1. Download the sample project for List View →https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/workingwithlistview/
  2. Update Xamarin forms to 4.2.0.848062
  3. Run the sample to any device with ios 13

Expected Behavior

when you tab to the cell view the selection color should be appeared

Actual Behavior

the tab event invoked but the selection color not appeared

Basic Information

  • Version with issue: Xamarin 4.2.0.848062
  • Last known good version: Xamarin 3.4.0.1008975
  • IDE: Visual Studio 2019
  • Platform Target Frameworks:

    • iOS:

  • Affected Devices:
    iphone 11 pro max 13.0 and ipad pro 12.9 inch 3rd generation 13.0

    Screenshots


2019-10-07_12-11-58

listview 3 iOS 13 in-progress bug

Most helpful comment

Thank you for reporting @OmerHmead

I have a suspicion this has something to do with the changes for dark mode.

When I change the code from the project you linked to something like:

<ListView x:Name="listView" ItemTapped="OnItemTapped" ItemsSource="{Binding .}" BackgroundColor="Transparent">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Label Text="{Binding .}" BackgroundColor="Transparent" />
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

(note the BackgroundColor tags)

Then I start seeing the highlighting again. Also, running this exact same code on iOS 12, it works.

Attached is a more standalone and up-to-date XF project:
Repro7850.zip

Possibly related: #7683 #7304

All 6 comments

Thank you for reporting @OmerHmead

I have a suspicion this has something to do with the changes for dark mode.

When I change the code from the project you linked to something like:

<ListView x:Name="listView" ItemTapped="OnItemTapped" ItemsSource="{Binding .}" BackgroundColor="Transparent">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Label Text="{Binding .}" BackgroundColor="Transparent" />
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

(note the BackgroundColor tags)

Then I start seeing the highlighting again. Also, running this exact same code on iOS 12, it works.

Attached is a more standalone and up-to-date XF project:
Repro7850.zip

Possibly related: #7683 #7304

I am having this same issue. Started with iOS 13. Have posted on the Forums and haven't seen a fix but have also had others report the same.

@jfversluis Great! Thanks for the workaround!

Also, I have two builds of the same app: one made before the release of iOS 13, and the other made after the release. If i run both releases on an iOS 13 device, in the first the listview behaves correctly, but in the second behaves as described in the original post.
I suppose the issue has something to do with the mono update rather than with the iOS version itself.
@jfversluis , could you confirm this?

So, just to check if I understand correctly. You have the same app, once built before iOS 13 and one built after the release of iOS 13.

If you run the pre-iOS13 one _on_ iOS 13 it still works correctly?

I don't think it has to do with the Mono version, but probably that you are building against the new iOS 13 APIs. The other thing that probably got updated between these two versions is Xcode?

So, just to check if I understand correctly. You have the same app, once built before iOS 13 and one built after the release of iOS 13.

If you run the pre-iOS13 one on iOS 13 it still works correctly?

Yep, thats right.
This i know since i have different builds in my TestFlight App running in a device with iOS 13.

Gotcha! Valuable information, thank you :)

Was this page helpful?
0 / 5 - 0 ratings