2015-07-11 103 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