android Dialog去掉标题栏 和边框
16lz
2022-08-09
android Dialog去掉标题栏 和边框
首先在 values/Style.xml文件中加入以下代码(如果没有该文件就创建一个XML名为Style.xml)
? < style name = "myDialogTheme" parent = "android: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:windowContentOverlay" >@null item > < item name = "android:backgroundDimEnabled" >false item > < item name = "android:windowBackground" >@null item > |
style > |
去掉背景色边框也就去掉了,在你的层中设置背景色就可以了
第二步在AndroidManifest.xml中在你注册activity中加入android:theme="@style/myDialogTheme" 这个名就是上面的样式名称
弹出层方法
Intent intent=new Intent(Detail_Goods.this,LoginDialog.class);
startActivity(intent);
更多相关文章
- android去除ImageButton白色边框
- IM-A820L限制GSM,WCDMA上网的原理(其他泛泰机型可参考)7.13
- android应用去掉title bar
- 怎么去掉联系人、通话记录、拨号列表界面中的电话号码中间的空格
- android圆形图片显示效果,带边框
- Android仿美图秀秀给图片加框
- Android实现圆角照片和圆形照片
- android使用shape设置下边框
- android TextView 实现自定义文字点击效果