/var/log/messages

Nov 28, 2013 - 2 minute read - Comments - android

ActionBar 非表示な備忘

備忘まで。

res/values/style.xml で以下な記述にしておいて

<style name="AppBaseTheme" parent="android:Theme.Light">
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
</style>

AndroidManifest.xm でアプリに対して適用していた模様。これは後天性記憶不全には優しくないなorz

あら、違うなorz

つーか

どうやって ActionBar 除去したのか分からんぞ。後天性記憶不全ここに極まれり。

困った

正味な話どーヤッたのか全然分からんぞ。自分でこさえておいてそりゃ無いでしょ、って話なのですが分かったら別途エントリ入れます。

このクソ忙しいときになんだこれorz

追記

終わり際に確認稼動確保。以下にメモを列挙。

  • 該当アプリのプロジェクト内には Activity が3つ存在し、いずれも ActionBar 非表示
  • ActionBar に関する記述が一切見当たらない
  • ある Activity については window title (?) への情報出力を行なっている
  • 上述の通り、res/values/styles.xml はデフォルト状態

あった、、、のか?

res/values-v14/styles.xml が以下な状態です。これですねorz

<resources>

    <!--
        Base application theme for API 11+. This theme completely replaces
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
    -->
    <!-- 
    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">

    </style>
    -->

</resources>

これだと AppBaseTheme は android:Theme.Light を、という事になるんですが R.style の Theme_Light の記述 によれば This is designed for API level 10 and lower とのことでやはりこれが ActionBar 非表示の所以でした。

分かって良かった。

追記

ああ、res/values-v11/styles.xml も修正必要でした。中身をコメントアウトせねばらしい。

<resources>

    <!--
        Base application theme for API 11+. This theme completely replaces
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
    -->
    <!-- 
    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
    </style>
    -->

</resources>