0
我要讓自定義標題欄爲我的cahnging我applicatin的顏色我name.How可以做到這一點的應用程序?
我要讓自定義標題欄爲我的cahnging我applicatin的顏色我name.How可以做到這一點的應用程序?
將此事寫入您的活動中。
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);
而mytitle佈局是xml文件,它將顯示爲標題菜單。 以下是一個小例子。
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myTitle"
android:text="custom title bar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="@color/titletextcolor"
android:gravity ="center"/>
,如果你只有想寫THEN
setTitle("Your TITLE");
你可以自己製作。其他參考文獻Reference 1,Reference 2。
[最佳示例] – Praveenkumar 2012-04-20 05:42:26
這是創建自定義標題欄的最佳示例。 .. http://www.londatiga.net/it/how-to-create-custom-window-title-in-android/ – wolverine 2012-04-20 05:28:23