您的位置:首页 > 移动开发 > Android开发

Android自定义标题时出现You cannot combine custom titles with other title features

2016-03-29 12:38 513 查看
public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.main_lock);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);
}

}

You cannot combine custom titles with other title features

通过安卓自定义修改标题栏的时候,出现了一个问题

you cannot combine custom titles with other title features

接着程序变崩了。

解决办法

在manifest文件中,修改android:theme="@style/android:Theme.Light" 

这样便能正常运行了

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: