アプリでアクション バーを使用しています。sherlock ライブラリを使用して Android バージョン 3.0 より下のアクション バーを表示しました。正常に動作しています。アプリにタイトル バーを追加したいのですが、次の操作を行いました。
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title_layout);
そしてxmlで私はこれをしました:
<style name="title_theme" parent="@style/Sherlock.__Theme.DarkActionBar">
<item name="android:windowNoTitle">false</item>
<item name="android:windowTitleSize">50dip</item>
<item name="android:windowTitleBackgroundStyle">@style/title_theme</item>
</style>
Android api < 3.0 では動作しましたが、3.0 以上では動作しません。
You cannot combine custom titles with other title feature..