【问题标题】:Modifying the default window title in Android for a tablet?为平板电脑修改 Android 中的默认窗口标题?
【发布时间】:2012-11-13 00:13:11
【问题描述】:

我正在寻找一种方法来稍微修改手机和平板电脑的 Android 应用程序中的默认窗口标题。下面的示例是标准标题栏的平板视图:

我尝试实现一个自定义标题栏,它可以工作,但上下文菜单(红色圆圈)消失了,这是我需要的。我想要做的就是更改底部边框的颜色或完全移除底部边框。

有没有办法在保留上下文菜单的同时进行更改?

谢谢

【问题讨论】:

  • 你在使用action bar sherlock库吗?

标签: android window contextmenu title custom-titlebar


【解决方案1】:

在您的清单中的应用程序标记中定义为:

android:theme="@style/mytheme"

现在在 res/values 中,您可以定义一个名为 theme.xml 的文件,其内容为:

<resources> 
<style name="mytheme" parent="@android:style/Theme" > 
   <item name="android:_DEFAULT_BASE_COLOR_1">#XXXXXX</item>
   <item name="android:windowNoTitle">true</item>
    ... . 
</style>
</resources>

这将改变您应用程序的基本配色方案。以下是 Android 上主要使用的颜色主题:http://developer.android.com/design/style/color.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-29
    相关资源
    最近更新 更多