2017-01-31 3 views
0

のその皮最後の行は、以下の私のコードです。私は、タイトル、説明を持つグリッドを作成しました。キーボードが隠れているときに、カメラのアイコンとそのバーがキーボードの上に表示され、画面の一番下に戻るようにしたいと思います。キーボードのポップアップ後キーボードのポップアップは、キーボードが<a href="https://i.stack.imgur.com/oOILG.png" rel="nofollow noreferrer">Before Keyboard Popup see Image</a></p> <p>グリッド の最後の行の非表示をポップアップするとき、私はxamarinフォームアンドロイドでAppCompactテーマを使用しているグリッド

<Grid RowSpacing="0" VerticalOptions="FillAndExpand"> 
     <Grid.RowDefinitions> 
      <RowDefinition Height="80" /> 
      <RowDefinition Height="*" /> 
      <RowDefinition Height="50" /> 
     </Grid.RowDefinitions> 
     <StackLayout 
      Grid.Row="0" 
      Padding="10,8" 
      BackgroundColor="White" 
      HorizontalOptions="FillAndExpand" 
      Orientation="Horizontal"> 
      <Entry 
       x:Name="GeneralPostTitle" 
       Margin="10,10,10,0" 
       FontSize="20" 
       HorizontalOptions="FillAndExpand" 
       Placeholder="Title" 
       PlaceholderColor="Gray" 
       TextColor="Black" 
       VerticalOptions="End" /> 
     </StackLayout> 
     <StackLayout 
      Grid.Row="1" 
      Padding="10,0" 
      BackgroundColor="White" 
      HorizontalOptions="FillAndExpand" 
      Spacing="0" 
      VerticalOptions="FillAndExpand"> 
      <StackLayout Padding="0" VerticalOptions="Fill"> 
       <customRenderer:PlaceholderEditor 
        x:Name="EditorDescription" 
        Margin="10,10,10,0" 
        FontSize="22" 
        HeightRequest="130" 
        HorizontalOptions="Fill" 
        Placeholder="Add Description" 
        PlaceholderTextColor="Gray" 
        TextColor="Gray" /> 
      </StackLayout> 
      <ScrollView Padding="10" Orientation="Horizontal"> 
       <StackLayout 
        x:Name="Images" 
        HorizontalOptions="FillAndExpand" 
        Orientation="Horizontal" 
        Spacing="5" /> 
      </ScrollView> 
     </StackLayout> 
     <StackLayout 
      Grid.Row="2" 
      Padding="20,0" 
      BackgroundColor="#FAFAFA"> 
      <Image 
       Aspect="AspectFit" 
       HeightRequest="40" 
       HorizontalOptions="StartAndExpand" 
       WidthRequest="30"> 
       <Image.Source> 
        <OnPlatform 
         x:TypeArguments="ImageSource" 
         Android="camera" 
         WinPhone="Icons/camera.png" 
         iOS="Icons/camera.png" /> 
       </Image.Source> 
       <Image.GestureRecognizers> 
        <TapGestureRecognizer Tapped="ImagePost_OnTapped" /> 
       </Image.GestureRecognizers> 
      </Image> 
     </StackLayout> 
    </Grid> 

あなたは、彼らが目に見えるとどまるので、Androidはビューのサイズを変更するためにSoftInput to AdjustResizeを設定する必要が画像

enter image description here

+0

レイアウトコードを投稿してください。 –

答えて

0

を参照してください。フォームでは、フォーム2.3.3のplatform specifics featureでこれを行うことができます。

チェックアウトthis Gist on how to do this in OnCreate()。 API 21+のステータスバーに追加されたアンダーレイを削除するために必要な回避策に注意してください。

+0

私はこれを使用していますが、ハーフスクリーンよりもキーボードを隠すことなく戻ったときに@jimmgarrは表示されません –

+0

私たちはイオスで同じことをやっていますか? @jimmgarr –

+0

iOSでは、カスタムレンダラを使用して、表示されたキーボードに応答し、ビューのサイズを変更する必要があります(ここに示すように)(https://forums.xamarin.com/discussion/comment/95846/#Comment_95846 )。あなたが言及したAndroidの問題に関しては、私は理解しているか分からない。 [MCVE](http://stackoverflow.com/help/mcve)を作成できますか?ありがとう! – jimmgarr

関連する問題

 関連する問題