改變style.xml 加入 <item name="android:windowNoTitle">true</item> 按理說可以把標題欄隱藏,但是當style時appCompat的某個主題的時候,這樣自定義style好像不起作用。
解決方法: 把android:windowNoTitle改為 windowNoTitle
例:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="windowNoTitle">true</item>
</style>