私は ActionBarSherlock を使用しており、アプリケーションの多くのフラグメントで setTitle メソッドを使用しています。次に例を示します。
getActivity().setTitle(articleName);
しかし、私は ActionBar にカスタム スタイルを使用しており、タイトルを変更するときに TextView で変更したいと考えています。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center"
android:textColor="@color/grey"
android:id="@+id/bar_title"
style="@style/Text.Medium">
</TextView>
</LinearLayout>
おそらく、setTitle をオーバーライドして独自のコードを追加することは可能ですか?