1,自定义布局(略)
2,设置style
<style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item><!--是否有边框-->
<item name="android:windowIsFloating">true</item><!--是否悬浮状态-->
<item name="android:windowIsTranslucent">false</item><!--提示框是否透明-->
<item name="android:windowNoTitle">true</item><!--是否有标题-->
<item name="android:windowBackground">@android:color/transparent</item><!--提示框的背景颜色-->
<item name="android:background">@android:color/transparent</item><!--背景颜色-->
<item name="android:windowFullscreen">true</item><!--是否全屏-->
</style>
3.创建dialog(略)
由此可避免,出现有边框,有阴影等奇奇怪怪的问题。