`
oldnew
  • 浏览: 28651 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

android全屏显示

阅读更多

无title bar

requestWindowFeature(Window.FEATURE_NO_TITLE);   

必须放在setContentView(R.layout.main); 前面,否则会报错。

全屏

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  WindowManager.LayoutParams.FLAG_FULLSCREEN); 

 

效果为启动后状态条有个消失的动画,然后全屏

 

FLAG_FULLSCREEN

Hide all screen decorations (e.g. status bar) while this window is displayed. This allows the window to use the entire display space for itself -- the status bar will be hidden when an app window with this flag set is on the top layer.

Constant Value: 1024 (0x00000400)
分享到:
评论
2 楼 gaogaf 2010-06-09  
16版的sdk全屏存在bug
1 楼 houjunli001 2010-05-10  
  好 谢谢

相关推荐

Global site tag (gtag.js) - Google Analytics