Android 创建没有标题栏的对话框
来源:互联网 发布:火车头采集器 织梦5.7 编辑:程序博客网 时间:2024/05/29 14:27
FEATURE_NO_TITLE works when creating a dialog from scratch, as in:
Dialog dialog = new Dialog(context);dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
But it doesn't work when creating an AlertDialog (or using the Builder), because it already disables the title and use a custom one internally.
I have looked at the SDK sources, and I think that it can't be worked around. So to remove the top spacing, the only solution is to create a custom dialog from scratch IMO, by using the Dialog class directly.
Also, one can do that with a style, eg in styles.xml:
<style name="FullHeightDialog" parent="android:style/Theme.Dialog"> <item name="android:windowNoTitle">true</item></style>
And then:
Dialog dialog = new Dialog(context, R.style.FullHeightDialog);
- Android 创建没有标题栏的对话框
- 创建标题栏有时间的对话框
- Win32汇编创建没有标题栏的窗体
- Android Studio生成的软件没有标题栏
- android 对话框的创建
- 隐藏对话框的标题栏
- 隐藏对话框的标题栏
- Android标题栏上菜单的创建
- Android 完全自定义对话框的实现(标题栏+EditText+双按钮)
- Android 创建自定义标题栏
- android 标题栏创建方法
- 无标题栏对话框的拖动
- 无标题栏对话框的拖动
- 移动没有标题栏的窗口
- 拖动没有标题栏的窗口
- android,标题栏显示加载,对话框显示加载
- android去掉对话框Dialog顶部标题栏
- JAVA Eclipse创建的Android程序如何不显示标题栏
- poj 1753(位运算+BFS)
- WAP1.0 前端开发经验
- Makefile术语一览表
- thinkPHP命名规范
- 设计数据库时需要考虑的因素
- Android 创建没有标题栏的对话框
- 发布Android应用程序过程
- 可以制作照片360°全景flash文件的jp软件
- 有关javascript:insertAdjacentHTML和javascript:insertAdjacentElement的用法
- C#创建txt文件
- ubuntu安装minicom
- jQuery对表单元素的取值和赋值操作
- Android移植的概念和方法以及主要工作
- zoj 1037