Multiple Entries in ListView always direct focus to first Entry (Moto G4 Only)

Viewed 110

On a Moto G4 device (Android 7.0), when viewing the sample page below, the first entry in the first cell is the only one that will consistently receive focus.

I believe this is due to a layout cycle running starting at the ListView when the keyboard appears and shifts the content. That layout cycle attempts to handle setting focus and decides the first entry wins.

I am unsure why this is a device specific issue. Any help would be appreciated.

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:system="clr-namespace:System;assembly=System.Runtime"
             x:Class="EntryBug.MainPage">
    <ListView VerticalOptions="FillAndExpand"
              HorizontalOptions="FillAndExpand"
              HasUnevenRows="True">
        <ListView.ItemsSource>
            <x:Array Type="{x:Type system:String}">
                <system:String>Testing 1</system:String>
                <system:String>Testing 2</system:String>
                <system:String>Testing 3</system:String>
                <system:String>Testing 4</system:String>
                <system:String>Testing 5</system:String>
                <system:String>Testing 6</system:String>
                <system:String>Testing 7</system:String>
                <system:String>Testing 8</system:String>
                <system:String>Testing 9</system:String>
                <system:String>Testing 10</system:String>
            </x:Array>
        </ListView.ItemsSource>
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.Children>
                            <Label Grid.Row="0"
                                   Grid.Column="0"
                                   TextColor="Black"
                                   Text="{Binding .}"/>
                            <Entry Grid.Row="1"
                                   Grid.Column="0"
                                   TextColor="Black"/>
                        </Grid.Children>
                    </Grid>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</ContentPage>
0 Answers
Related