【发布时间】:2014-01-18 19:09:07
【问题描述】:
我在 styles.xml 中定义了这个主题:
<style name="customTheme" parent="AppBaseTheme">
<item name="android:windowTitleSize">40dip</item>
</style>
在那个自定义主题中,我定义了一个自定义标题栏。除了自定义标题栏,我想保持主题原创:
parent="AppBaseTheme"
问题是当我尝试像这样设置这个自定义标题时:
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_home);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_bar);
我在第二行收到一条错误消息:
您不能将自定义标题与其他标题功能结合使用。
如何仅将标题更改为我的custom_title_bar 布局来保留原始主题?
【问题讨论】:
标签: android android-manifest android-theme titlebar