dialogfragment弄了一个弹出alert框,白色背景消不掉,求助!!! 将dialog背景设置为空,透明的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Light.NoActionBar改成Translucent.NoActionBar 贴错了<item name="android:windowIsTranslucent">true</item><!-- 半透明 --> 我刚刚试了一下Translucent.NoActionBar,囧,木有找到对应的选项,半透明我之前试过,是把整个窗口半透明了,我是想去掉后面那层白色的底哈。 关于设置背景透明的方法,为了避免干扰,新建了一个test工程结果如下:<color name="transparent">#b000</color>设置背景方法一:<style name="CustomAlertDialogBackground" parent="@android:style/Theme.Holo.Light.Dialog"> <item name="android:background">@color/transparent</item> <item name="android:windowBackground">@null</item></style>设置背景方法二:<style name="CustomAlertDialogBackground" parent="@android:style/Theme.Holo.Light.Dialog"> <item name="android:background">@null</item> <item name="android:windowBackground">@color/transparent</item></style>用AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.CustomAlertDialogBackground);加载这个style方法一的结果:方法二的结果:不知道我的方法是否有错误。我那个圆角处的白色底边依然还在,实际背景的区域好似也不是白色那一层,白边的问题依然不懂如何去掉,求解啊!!! getDialog().getWindow().setBackgroundDrawable(newColorDrawable(Color.TRANSPARENT));完事! 把 xxxxx.setView() //只修改内容更改成xxxxx.setContentView()//修改整个dialog窗口的显示就没有后面的背景了。 android小问题,求各位大虾解救啊!!!! Android 类似动态水纹壁纸的制作方法 listVIew CTS使用Verifier.apk测试Data Backup Test 失败 AVD问题 udp断包 android 使用speex进行音频解码,解码为mp3,求讨论帮助! listview 长按事件 改变item里面的Imageview的图片 android开发百度地图定位到大西洋去了!! 文件操作和sqlite的性能比较 4.0+自动升级功能完好,但在2.3.5中无法下载软件 服务器 socket通信问题
结果如下:
<color name="transparent">#b000</color>
设置背景方法一:
<style name="CustomAlertDialogBackground" parent="@android:style/Theme.Holo.Light.Dialog">
<item name="android:background">@color/transparent</item>
<item name="android:windowBackground">@null</item>
</style>
设置背景方法二:
<style name="CustomAlertDialogBackground" parent="@android:style/Theme.Holo.Light.Dialog">
<item name="android:background">@null</item>
<item name="android:windowBackground">@color/transparent</item>
</style>
用AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.CustomAlertDialogBackground);加载这个style方法一的结果:方法二的结果:不知道我的方法是否有错误。
我那个圆角处的白色底边依然还在,实际背景的区域好似也不是白色那一层,白边的问题依然不懂如何去掉,求解啊!!!
更改成
xxxxx.setContentView()//修改整个dialog窗口的显示
就没有后面的背景了。