Android的活性对话,但没有标题栏 [英] Android activity as dialog, but without a title bar

查看:142
本文介绍了Android的活性对话,但没有标题栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有以下设置为主题的活动:

I have an activity that has the following set as theme:

android:theme="@android:style/Theme.Dialog"

不过,有活动,对话框出现在标题栏,使用了小的可用空间,我有。我怎样才能删除它?

However, there is a title bar in the activity-dialog that appears, that uses up the little available space that I have. How can I remove it?

推荐答案

试着做 requestWindowFeature(Window.FEATURE_NO_TITLE); 的onCreate 。这将需要被调用后立即进行 super.onCreate 和之前的setContentView

Try doing requestWindowFeature(Window.FEATURE_NO_TITLE); in onCreate. It'll need to be done immediately after calling super.onCreate and just before setContentView.

这篇关于Android的活性对话,但没有标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆