我在listview中有条目控件。当我在ViewCell中进行焦点输入时,会出现软键盘并隐藏输入控件,因为未滚动列表视图以将文本输入带到视图区域。
为了解决这个问题,我尝试在ScrollView中使用listview,但它并没有解决问题。
我们是否可以建议解决此问题的任何解决方案,因为我们在项目的许多页面中使用listview中的入口控制。
提前致谢。
版本详细信息:
Xamarin 4.0.0.1689 Xamarin.Forms 1.5.0 Xamarin.iOS 9.2.1.5.1
示例源代码:
<ViewCell>
<Grid ColumnSpacing="15" Padding="20,20,30,20" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Text="{Binding Description}" XAlign="Start" YAlign="Center" Style="{DynamicResource SectionBlueColorLbl}" LineBreakMode="WordWrap" Grid.Row="0" Grid.Column="0" />
<CustomControl:CustomEntry Keyboard="Numeric" Text="{Binding WeightText}" IsEnabled="{Binding IsOccupied}" Focused="WeightEntry_focused" Unfocused="Weight_Unfocused" HeightRequest="39" WidthRequest="100" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Grid.Row="0" Grid.Column="1" BackgroundColor="Transparent" TextColor="#FFFFFF">
<CustomControl:CustomEntry.Behaviors>
<FormsLib:IntegerValidationBehavior MaxLength="5" />
</CustomControl:CustomEntry.Behaviors>
</CustomControl:CustomEntry>
<Label Text="{Binding Location.Arm}" XAlign="End" YAlign="Center" Style="{DynamicResource CaptionLabelSmall}" LineBreakMode="WordWrap" Grid.Row="0" Grid.Column="2" />
<Label IsVisible="false" BindingContext="Location" Text="{Binding LatArm}" XAlign="End" YAlign="Center" Style="{DynamicResource CaptionLabelSmall}" LineBreakMode="WordWrap" Grid.Row="0" Grid.Column="3" />
<Label Text="{Binding MomentText}" XAlign="End" YAlign="Center" Style="{DynamicResource CaptionLabelSmall}" LineBreakMode="WordWrap" Grid.Row="0" Grid.Column="4" />
<Label IsVisible="false" Text="{Binding LatMomentText}" XAlign="End" YAlign="Center" Style="{DynamicResource CaptionLabelSmall}" LineBreakMode="WordWrap" Grid.Row="0" Grid.Column="5" />
</Grid>
</ViewCell>