Androidアプリケーションのタイトルバーをカスタマイズしたい。私は次のレイアウトを持っています:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="80dp" <!-- Problem here -->
android:gravity="center_vertical"
>
<ImageView
android:id="@+id/header"
android:background="@drawable/windowtitle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
また、対象となるアクティビティに次のコードがあります。
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.home);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title);
...
}
値を変更してもタイトルバーの高さが変わらない理由がわかりませんandroid:layout_height
。
私は何か見落としてますか?
ありがとう!