android EditText中使用透明主题

在 activity 中使用下面的主题:

<style name="Theme.TranslucentDarkGrey" parent="android:Theme">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@color/translucent_dark_grey</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:backgroundDimEnabled">false</item>
</style>

然后给出一个半透明的灰色背景去看后面的activity。问题是程序中有一个EditText,但是不能填充父类。如果我移除上面的主题,它就能很好地填满。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<EditText
    android:id="@+id/body"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:scrollbars="vertical" android:layout_weight="1"/>
</LinearLayout>

我用下面的方法解决:

<style name="Theme.TranslucentDarkGrey" parent="android:Theme.Translucent">
    <item name="android:windowBackground">@color/translucent_dark_grey</item>
</style>

这样解决:

<style name="Theme.TranslucentDarkGrey" parent="android:Theme.Translucent">
<item name="android:windowBackground">@color/translucent_dark_grey</item>

在 edit-box 这一行添加下面的代码:

android:background="@null"