The background for the top of the screen uses the following theme, and should be transparent. In portrait mode the background turns black. Sometimes this doesn't even happen and the background stays transparent. To test this out I'm using the TED text editor app. As I say the background turns black in portrait mode in TED. I wrote my own activity that has a multi-line text input field, and in this activity the background displays correctly. In another example the background in my Gmail app turns white in portrait mode when I try to compose a new email.
I show some of the layout of the IME below too.
<resources>
<!-- some styles here -->
<style name="AppTheme.Custom" parent="AppTheme.NoActionBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent" >false</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowCloseOnTouchOutside">true</item>
<item name="android:colorBackgroundCacheHint">@android:color/transparent</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowContentOverlay">@android:color/transparent</item>
<item name="android:backgroundDimAmount">0.5</item>
</style>
</resources>
Here's some of the layout for the IME:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1"
android:theme="@style/AppTheme">
<LinearLayout
android:background="#00000000"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:theme="@style/AppTheme.Custom"
android:layout_gravity="top"
android:id="@+id/topHalf"></LinearLayout>
<include layout="@layout/content_main"
android:layout_weight="0.5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/AppTheme"
android:layout_gravity="bottom"
/>
</LinearLayout>
</FrameLayout>