android - Xamarin Forms Android 上的选取器问题
问题描述
我有一个使用如下选择器的 Xamarin Forms 应用程序。在 Windows 上它工作正常,但在 Android 上,当尝试选择一个项目时,选择器项目会显示多次。我注意到当我将 Android 目标从 Android 7 更改为 Android 8 时开始发生这种情况。有没有人也遇到过这个问题?是否有可用的修复/解决方法?
谢谢保罗。
<ListView x:Name="ListViewExInspection"
HasUnevenRows="True"
ItemsSource="{Binding ExInspectionDetail}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="0,0,15,1">
<Label FontSize="Small" Text="{Binding InspectionSection}" TextColor="Black" FontAttributes="Bold"/>
<Label FontSize="Small" Text="{Binding InspectionText}" VerticalOptions="Start" TextColor="Black"/>
<Label FontSize="Small" Text="Status" TextColor="Black" FontAttributes="Bold"/>
<Picker x:Name="PkStatus" TextColor="Black" FontSize="Small"
SelectedIndex="{Binding InspectionStatus, Mode=TwoWay}"
IsEnabled="{Binding StatusEnabled}">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Incomplete</x:String>
<x:String>Pass</x:String>
<x:String>Fail</x:String>
<x:String>N/A</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
解决方案
推荐阅读
- javascript - jQueryUI datepicker 不显示下一个以前的三角形箭头
- performance - Angular 5 应用程序需要很长时间才能为初次使用的用户加载,我需要帮助来加快速度
- c - 为什么用 papi 读取硬件计数器的结果取决于 PAPI_library_init 位置?
- terraform - Terraform 远程状态使用不正确的文件
- php - 使用 PHP 保留文件属性压缩文件夹
- ruby-on-rails - 在远程 SSL 代理后面使用 Rails config.force_ssl 进行无限重定向
- gradle - 如何避免在运行 gradle 任务时创建构建目录?
- file - 如何从base64字符串下载文件以反应本机?
- asp.net - asp.net Web 表单 (VB) 页面从 SQL 呈现不正确的数据
- protractor - 如何使用量角器找到桌面视图的汉堡图标?