I need to get my title bar to be orange instead of the standard gray and I can't figure out how to edit it's settings. I also need to align the text so its on the right side of the title bar instead of the left. Any ideas on how to do this?
Asked
Active
Viewed 5,547 times
2 Answers
0
To give the title bar your desired color(orange), use the following code in your oncreate,
this.setTitleColor(#FF6600);
or create a custom title bar and use it throughout the application. U can do all kinds of modifications if you create your custom title bar.
eg.
<?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>

HjK
- 3,513
- 1
- 17
- 23