首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

自定义dialog式样

2012-09-04 
自定义dialog样式?xml version1.0 encodingutf-8?resourcesstyle nameCustomDialogTheme pa

自定义dialog样式

<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomDialogTheme" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/transparent_white</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

这里面呢如果windowIsFloating是false,那么就是设置自己的颜色 ,就需要在windowBackground

设置自己所要展示的。

myDialog = new Dialog(this, R.style.CustomDialogTheme);构造自己定义的就可以了

热点排行