以往
在每個(gè)activity的onCreate方法中都要寫一句
requestWindowFeature(Window.FEATURE_NO_TITLE);
那是十分麻煩的事情...
現(xiàn)在
只要在資源文件res-values下的styles配置一下即可:
<style name="AppTheme" parent="AppBaseTheme"> <item name="android:windowNoTitle">true</item> </style>
然后在清單文件中引用該主題文件:
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > ... </application>