タイトル バーを標準のグレーではなくオレンジにする必要がありますが、その設定を編集する方法がわかりません。また、テキストをタイトル バーの左側ではなく右側に配置する必要があります。これを行う方法についてのアイデアはありますか?
質問する
5523 次
2 に答える
0
タイトル バーに希望の色 (オレンジ) を付けるには、oncreate で次のコードを使用します。
this.setTitleColor(#FF6600);
または、カスタム タイトル バーを作成して、アプリケーション全体で使用します。カスタム タイトル バーを作成すると、あらゆる種類の変更を行うことができます。
例えば。
<?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">
<ImageView android:id="@+id/ImageView01"
android:layout_width="57px"
android:layout_height="wrap_content"
android:background="@drawable/icon1">
</ImageView>
<TextView
android:id="@+id/myTitle"
android:text="This is my new title"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="@color/titletextcolor"
/>
</LinearLayout>
于 2012-03-26T10:00:15.727 に答える
0
于 2011-02-10T19:04:47.083 に答える