如何隐藏 Activity 的标题栏 requestWindowFeature(Window.FEATURE_NO_TITLE); 这个方式在手机上好用,在平板上不好用! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这不是原因,你用的是 android supportv7 包里的 Appcompat 框架,来实现 Actionbar 对吧,对于这个包里的 ActionbarActivity, 他在初始化的时候,会检查你的 theme, 如果主题不是 Appcompat 的主题就会报错,你改一下主题形式,让他为,Theme.AppCompat.Light 就好了 我是在手机上用,SDK 的版本是:10,Android 的版本是:2.3.6(不知道说的对不对) 在 Eclipse 的 Activity 的 “Graphic Layout” 中看到的已经是没有标题栏了,可能下载到手机上运行却有标题栏。 如果要隐藏掉 Actionbar, 就是用 getSupportActionbar().hide()就好了 是这样修改吗?<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.AppCompat.Light"> 恩,如果你的 activity 没有重写 android:theme 的话,这样就好了 Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 嗯,我没有重写 Activity。但那样设置还是没有达到隐藏标题栏的目的。不过调用你 6L 提供的方法是可以的。多谢! 感觉还是没有找到Theme.NoTitleBar,既然V7包,看下V7包里面的style有什么 求助 关于android弄选择题考试系统的问题 关于空气质量网站的接口 android 怎么播放rtsp://110.80.31.70:6000/channe1 android calculator的疑惑 最近在做一个应用通过蓝牙传送名片,但是目前不知道如何获取名片的位置 散分,光棍节快乐 android播放hls协议的流媒体demo怎么写 Eclipse的模拟器问题,快崩溃了 git上的开源项目的gradle构建的,如何转变成一个普通的android项目呢? 输入法把布局挤跑了 android中的SD卡使用 Android 发送十六进制byte的问题
是这样修改吗?
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light">
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
嗯,我没有重写 Activity。但那样设置还是没有达到隐藏标题栏的目的。
不过调用你 6L 提供的方法是可以的。
多谢!