【问题标题】:keeping current theme and adding actionBar to app保持当前主题并将 actionBar 添加到应用程序
【发布时间】:2013-05-23 04:37:40
【问题描述】:

我目前正在使用标准 Theme.Light.NoTitleBar 并希望保留它,但要使用 actionBar,我必须使用 Theme.Sherlock 作为父级。有没有解决的办法?

如果没有,我如何使用Theme.Sherlock 作为父母并保留我以前的东西?

【问题讨论】:

    标签: android styles themes


    【解决方案1】:

    如果您使用 Theme.Light.NoTitleBar,则 ActionBar 将不会显示。 ActionBar 只不过是一种 TitleBar。

    如果您已经有一些带有某些样式的主题并想使用操作栏,请尝试以下操作

    对于深色主题

    <style name="YourTheme" parent="Theme.Sherlock"></style>
    

    对于浅色主题

    <style name="YourTheme" parent="Theme.Sherlock.Light"></style>
    

    【讨论】:

      猜你喜欢
      • 2016-05-24
      • 2011-12-29
      • 1970-01-01
      • 2018-06-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-26
      相关资源
      最近更新 更多