Android键盘关闭时,白色背景会在1秒内显示

Android键盘关闭时,白色背景会在1秒内显示,android,android-layout,xamarin.android,android-softkeyboard,Android,Android Layout,Xamarin.android,Android Softkeyboard,当我点击关闭虚拟键盘时,该位置会显示白色背景1秒 我使用活动(WindowsOfInputMode=SoftInput.AdjustResize)按下虚拟键盘上方的“完成”按钮,但会看到白色背景 如果我使用活动(WindowsOfInputMode=SoftInput.AdjustPan)没有白色背景,但上面没有“完成”按钮 如何使用AdjustResize修复白色背景 <LinearLayout android:layout_width="match_parent" an

当我点击关闭虚拟键盘时,该位置会显示白色背景1秒

我使用
活动(WindowsOfInputMode=SoftInput.AdjustResize)
按下虚拟键盘上方的“完成”按钮,但会看到白色背景

如果我使用
活动(WindowsOfInputMode=SoftInput.AdjustPan)
没有白色背景,但上面没有“完成”按钮

如何使用AdjustResize修复白色背景

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/itemsRecyclerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <Button
        android:id="@+id/doneButton"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:visibility="gone" />

</LinearLayout>

主题:

  <style name="AppTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="colorPrimary">#f2f2f2</item>
    <item name="colorPrimaryDark">#f2f2f2</item>
    <item name="colorAccent">#f2f2f2</item>
    <item name="colorControlHighlight">@color/blue</item>

  </style>

  <style name="AppTheme" parent="AppTheme.Base">
    <item name="android:windowContentTransitions">true</item>
    <item name="android:windowAllowEnterTransitionOverlap">true</item>
    <item name="android:windowAllowReturnTransitionOverlap">true</item>
    <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
    <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
    <item name="colorAccent">#979797</item>
  </style>

真的
假的
#f2f2f2
#f2f2f2
#f2f2f2
@颜色/蓝色
真的
真的
真的
@android:过渡/移动
@android:过渡/移动
#979797

我使用下面的代码解决了这个问题:
findviewbyd(Android.Resource.Id.Content).RootView.SetBackgroundColor(Color.Transparent)

它可能与您的主题(背景色)有关。你能为你正在使用的主题添加代码吗?@Froyo我已经添加了你能为
AppTheme.Base
添加代码吗?@Froyo done AppTheme.Base
theme.AppCompat.Light.DarkActionBar
是浅色主题,背景为白色。您可以尝试
Theme.AppCompat
作为深色背景。或者在主题中设置
android:background=“#你的颜色”
。如果您的活动/片段布局具有背景色,则不建议将背景渲染两次。很高兴听到您自己解决了问题,请将您的答复标记为答案,谢谢。