2015-07-11 41 views

回答

3

請參閱此document

基本上,調用此方法在onCreate,只是setContentView

// This example uses decor view, but you can use any visible view. 
View decorView = getActivity().getWindow().getDecorView(); 
int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE; 
decorView.setSystemUiVisibility(uiOptions); 

當你需要以編程方式揭示酒吧之前,清除標誌象下面這樣:

View decorView = getActivity().getWindow().getDecorView(); 
// Calling setSystemUiVisibility() with a value of 0 clears 
// all flags. 
decorView.setSystemUiVisibility(0); 
+0

感謝它的工作原理。 – Herman