Android 技術總結(011)—— 隱藏標題欄和狀態欄

[java]
@Override 
public void onCreate(Bundle icicle) { 
super.onCreate(icicle); 
 
final Window win = getWindow(); 
// No Statusbar www.aiwalls.com
win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
WindowManager.LayoutParams.FLAG_FULLSCREEN); 
 
// No Titlebar 
requestWindowFeature(Window.FEATURE_NO_TITLE); 
 
setContentView(R.layout.mylayout); 

發佈留言