android – 可以在xml中将setDisplayShowTitleEnabled设置为主题ActionBar吗?

android – 可以在xml中将setDisplayShowTitleEnabled设置为主题ActionBar吗?,第1张

概述我试图在xml而不是代码中主题化ActionBar.到目前为止我有这个: <style name="TestTheme" parent="android:Theme.Holo.Light"> <item name="android:actionBarStyle">@style/TestActionBar</item></style><style name="TestActionBar 我试图在xml而不是代码中主题化Actionbar.到目前为止我有这个:
<style name="Testtheme" parent="androID:theme.Holo.light">    <item name="androID:actionbarStyle">@style/TestActionbar</item></style><style name="TestActionbar" parent="androID:style/Widget.Holo.light.Actionbar">    <item name="androID:background">@drawable/actionbar_background</item></style>

这是给我我的自定义背景,我想要能够关闭这里的标题.在代码中,我将setdisplayShowTitleEnabled设置为false.如何在xml中执行?

解决方法 好的,这里是答案.将其添加到上面的第二个样式块中,隐藏标题.
<item name="androID:displayOptions">showHome|uselogo</item>
总结

以上是内存溢出为你收集整理的android – 可以在xml中将setDisplayShowTitleEnabled设置为主题ActionBar吗?全部内容,希望文章能够帮你解决android – 可以在xml中将setDisplayShowTitleEnabled设置为主题ActionBar吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1132532.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存