C# Xamarin表单列表视图';s条目与自定义选择器冲突

C# Xamarin表单列表视图';s条目与自定义选择器冲突,c#,android,listview,xamarin.forms,C#,Android,Listview,Xamarin.forms,我的应用程序出现了一个非常奇怪的问题,我有一个自定义选择器,在listview的头中有一个图像、XAML和C代码: 公共异步无效筛选器1\u SelectedIndexChanged(对象发送方,事件参数e) { 指数=0; 所选变量=filter1.Items[filter1.SelectedIndex]; for(int i=0;i

我的应用程序出现了一个非常奇怪的问题,我有一个自定义选择器,在listview的头中有一个图像、XAML和C代码:


公共异步无效筛选器1\u SelectedIndexChanged(对象发送方,事件参数e)
{
指数=0;
所选变量=filter1.Items[filter1.SelectedIndex];
for(int i=0;i
以及在viewcell中有一个条目的listview、XAML和C#代码:


私有无效条目\u TextChanged(对象发送者,textchangedventargs e)
{
var entry=发送方作为条目;
var product=entry.BindingContext作为销售\订单\项目;
如果(e.NewTextValue!=null&&e.NewTextValue!=“”&&&&!e.NewTextValue.Contains(“-”&!e.NewTextValue.Contains(“.”))
product.requested_quantity=int.Parse(例如NewTextValue.ToString());
其他的
产品要求数量=0;
}
当我关注每个viewcell上的条目时,listview在android上显示时,事情就发生在android上。选择器被键盘启用,键盘消失!!!!在iOS上,它工作正常:


知道为什么会这样吗

自定义选择器被放置在listview的标题中,我将其放置在listview之外。应用程序现在工作正常

<controls:CustomPicker Image="arrow" x:Name="filter1" SelectedIndexChanged="filter1_SelectedIndexChanged" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent" TextColor="Black" Title="Category">
                                <controls:CustomPicker.Margin>
                                    <OnIdiom Phone="8,8,8,8" Tablet="12,12,12,12"/>
                                </controls:CustomPicker.Margin>
                                <controls:CustomPicker.FontSize>
                                    <OnIdiom Phone="16" Tablet="24"/>
                                </controls:CustomPicker.FontSize>
                            </controls:CustomPicker>

 public async void filter1_SelectedIndexChanged(object sender, EventArgs e)
        {
            index = 0;
            var selected = filter1.Items[filter1.SelectedIndex];
            for (int i = 0; i < mylist.Count; i++)
            {
                if (mylist[i].description == selected && selected != null && selected != "")
                {
                    await GetItemsCategorized(mylist[i].code, index, searching.Text);
                }
            }
        }
<StackLayout Orientation="Horizontal" HorizontalOptions="EndAndExpand">
                                                    <Entry Keyboard="Numeric" HorizontalOptions="EndAndExpand" TextChanged="Entry_TextChanged"  WidthRequest="40">
                                                        <Entry.Behaviors>
                                                            <controls:NumericValidationBehavior/>
                                                        </Entry.Behaviors>
                                                    </Entry>
                                                </StackLayout> 




  private void Entry_TextChanged(object sender, TextChangedEventArgs e)
    {
        var entry = sender as Entry;
        var product = entry.BindingContext as Sales_Order_Items;
        if (e.NewTextValue != null && e.NewTextValue != "" && !e.NewTextValue.Contains("-") && !e.NewTextValue.Contains("."))
            product.requested_quantity = int.Parse(e.NewTextValue.ToString());
        else
            product.requested_quantity = 0;
    }