在onCreat()中
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.title);,然后加title.xml文件:
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_gravity="center">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MMTA" />
即可,此方法不能用在TabActivity中。