xamarin.forms - xamarin 表单键盘涵盖的编辑器
问题描述
你好朋友你好吗?我告诉你,我有一个旨在编写消息并存储它的页面。问题是当我将自己定位在编辑器中时,屏幕被剪切,仅显示编辑器的一半。会发生什么?你可以帮帮我吗?。非常感谢您的帮助。
这是我的代码:
</TabbedPage>
<ContentPage>
....
</ContentPage>
<ContentPage>
....
</ContentPage>
<ContentPage x:Name="MessagesContentPage" Title="Messages" >
<Grid BindingContext="{Binding MessageViewModel}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" VerticalOptions="Start">
<ScrollView>
<ListView
x:Name="OpportunityMessagesListView"
SeparatorVisibility="Default"
IsRefreshing="{Binding IsRefreshing}"
SelectionMode="None" >
<ListView.ItemTemplate>
<DataTemplate >
<ViewCell >
<ViewCell.ContextActions>
<MenuItem x:Name="MenuItemDeleteMessage" Clicked="MenuItemDeleteMessage_Clicked" Text="Eliminar" IsDestructive="True" CommandParameter="{Binding Id}" IsEnabled="{Binding IsMenuEnabled}">
<!--<MenuItem.IconImageSource>
<FontImageSource Glyph="Rechazar" FontFamily="{StaticResource FontAwesomeSolid}" Color="#e82424" />
</MenuItem.IconImageSource>-->
</MenuItem>
</ViewCell.ContextActions>
<Grid x:Name="Item" Padding="3" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Margin="0" Text="{Binding Message}" VerticalTextAlignment="Center" HorizontalTextAlignment="Start" HorizontalOptions="FillAndExpand" LineBreakMode="CharacterWrap"/>
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding CreationTime, StringFormat='{0:yyyy-MM-dd HH:mm:ss}'}" TextColor="LightGray" BackgroundColor="Transparent" HorizontalTextAlignment="End"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollView>
</Grid>
<Grid Grid.Row="1" VerticalOptions="End" Padding="3" Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<customControl:ExtendedEditor x:Name="MessageExtendedEditor" Grid.Row="0" Grid.Column="0" AutoSize="TextChanges" Placeholder="Esccriba información de seguimiento" />
<Button Grid.Row="0" Grid.Column="1" x:Name="SaveMessageButton" Clicked="SaveMessageButton_Clicked" FontFamily="{StaticResource FontAwesomeSolid}" Text="" HeightRequest="57" VerticalOptions="End" FontSize="27" BackgroundColor="Transparent" BorderColor="Transparent" TextColor="#5694ff" />
</Grid>
</Grid>
</ContentPage>
解决方案
作为一个建议,考虑到我们正在谈论 Xamarin Forms,最好解释一下您是否仅在 Android、iOS 或两者(或 UWP 以防万一)上遇到此问题。
无论如何,我认为在以下链接中您可以找到所需的所有帮助
https://xamarinhelp.com/accommodate-on-screen-keyboard-xamarin-forms/
让我知道它是否能解决您的问题。如果它不能解决您的问题,我认为最好以更详细的方式解释问题。
推荐阅读
- jquery - Jquery Datatables - 如果表头包含名称为“URL”的列,则为该表列数据提供超链接
- android - BottomSheetDialogFragment 更改定义的背景颜色
- javascript - 使用地图时如何创建和新对象?
- vim - `source $MYVIMRC` 在我删除一些内容时不起作用,但在我添加一些内容时它确实起作用
- docker - 如何在 PyCharm IDE 中浏览 docker 容器?
- sql - 如何检查 SQL 游标是否指向 ile rpg 中文件的第一条记录?
- angular - 缩放客户端-JHipster
- html - 在元素的一半上设置背景
- javascript - JavaScript:如何访问 OS Windows 中的系统窗口
- java - Java正则表达式在拆分的url路径中查找所有单词