2011-02-10 9 views
0

タイトルバーを標準のグレーの代わりにオレンジ色にする必要があり、その設定を編集する方法がわかりません。私はまた、テキストを左の代わりにタイトルバーの右側に配置する必要があります。これを行う方法に関するアイデア?タイトルバーはどのように編集しますか?

答えて

0

this.setTitleColor(#FF6600); 

またはカスタムタイトルバーを作成して、アプリケーション全体でそれを使用する、あなたのOnCreateイベントに次のコードを使用し、タイトルバーにご希望のカラー(オレンジ)を得ました。カスタムタイトルバーを作成すると、Uはあらゆる種類の修正を行うことができます。

例えば、

 <?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> 
関連する問題