2013年3月6日 星期三

Android UI刪除上方黑色標題Title bar

用eclipse新增Android專案會遇到一個問題就是UI最上方有個黑黑的佔空間的標題 =.=

其實那個是ActionBar

解決辧法在style.xml裡
例如你用的是SDK14版的,到 [res]->[values-v14]->[style.xml]
把android:Theme.Holo.Light.ActionBar改成NoActionBar
搞定收工 ♪(┌・。・)┌


<resources>
    <!--
        Base application theme for API 14+. This theme completely replaces
        AppBaseTheme from BOTH res/values/styles.xml and
        res/values-v11/styles.xml on API 14+ devices.
    -->
    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.NoActionBar">
        <!-- API 14 theme customizations can go here. -->
    </style>
</resources>

1 則留言:

  1. 我將我的DarkActionBar換成DarkActionBar
    結果出現error
    整個後面背景全不見

    回覆刪除