【发布时间】:2010-09-23 06:54:45
【问题描述】:
我已按照这个 SO 问题的说明进行操作:How to change the text on the action bar
我能够成功地创建自己的标题栏,但是当我将背景颜色应用到我的布局时,颜色不会跨越整个标题栏。 android 灰色背景色仍有残留。
这是我的 XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="400px"
android:layout_height="fill_parent"
android:orientation="horizontal" android:background="@color/solid_blue">
<ImageView android:id="@+id/logo"
android:layout_width="57px"
android:layout_height="wrap_content"
android:background="@drawable/icon">
</ImageView>
<TextView
android:id="@+id/myTitle"
android:text="StockDroid by"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#FFFFFF"
/>
</LinearLayout>
【问题讨论】:
标签: java android android-linearlayout titlebar