requestWindowFeature(...)可讓標題欄不顯示,而getWindow().setFlags(...)可以設定全螢幕顯示。
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
...
<application android:icon="@drawable/wusjp" android:label="@string/app_name" >
<activity
android:theme="@android:style/Theme.NoTitleBar"
...
>
...
activity>
application>
沒有留言:
張貼留言