无标题,无背景透明的,继承了Dialog布局模式的style
<style name="dialogcustom" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@null</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@+android:style/Animation.Translucent</item>
</style>
在menufest.xml中定义activity使用的theme
<activity
android:name="com.kraft.e.DialogCustomActivity"
android:screenOrientation="portrait"
android:theme="@style/dialogcustom" >
</activity>
然后,Activity的布局在xml文件中定义。这样,就完成了一个非全屏的窗口