私はXamarin.Formsチャットアプリケーションを作成しようとしていました。 問題は次のとおりです。Androidでは、キーボードが表示されるとすぐに、アクションバーを含むページ全体が上に移動します。私はIOSの問題をページのサイズを変更するNuGetパッケージを使って修正することができました。XamarinフォームAndroidキーボードがページ全体を上に移動
AndroidプロジェクトのMainActivity.csにすでにWindowSoftInputMode = Android.Views.SoftInput.AdjustResize
を設定しようとしましたが、動作しませんでした。 画面サイズを再計算して手動でページのサイズを変更しようとしましたが、別のデバイスで正確な計算のためにキーボードサイズを取得するソリューションが見つかりませんでした。
誰も以前に同じ問題があったのですか? サポートされているすべてのプラットフォーム用の正式なXamarin.Formsソリューションはありますか?
これは、これまで私のチャットのレイアウトです:事前に
<ContentPage.Content>
<StackLayout Padding="0">
<ScrollView>
<ListView HasUnevenRows="true" x:Name="lvChat" >
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Vertical" VerticalOptions="Fill" HorizontalOptions="Fill" Padding="5">
<Label Text="{Binding Author, StringFormat='{0}: '}" TextColor="Navy" FontSize="14" />
<Label Text="{Binding Text}" TextColor="Black" FontSize="15" />
<Label Text="{Binding Time}" TextColor="Black" FontSize="14" />
<!-- Format for time.. , StringFormat='{0:HH:mm}' -->
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollView>
<StackLayout Orientation="Horizontal" Padding="0" Margin="5, 5, 5, 5">
<Entry Keyboard="Chat" x:Name="tbxChatInput" HorizontalOptions="FillAndExpand" Placeholder="Send a Message..." />
<Button x:Name="btnSendMsg" HorizontalOptions="End" Text="Send" Margin="5"/>
</StackLayout>
</StackLayout>
ありがとう!