Android4.4 全屏幕模式,沉浸模式 & 在应用内开启透明状态栏和透明虚拟按钮


众所周知,Android从4.4开始,就进入了沉浸模式,下面的链接有个视频可以观看一下。

沉浸模式


这里有个翻译过后的文档:
https://developer.android.com/training/system-ui/immersive.html#nonsticky
这里有实践的说明:


Android4.4新的特性,在应用内开启透明状态栏和透明虚拟按钮

这篇文章写的非常好,写的非常细致。
官方文档:
https://developer.android.com/training/system-ui/status.html



更多4.4的新特性请移步:

如果你是做rom开发的,请一定重点看看这2个:

一:Immersive full-screen mode

To provide your app with a layout that fills the entire screen, the new SYSTEM_UI_FLAG_IMMERSIVE flag forsetSystemUiVisibility() (when combined withSYSTEM_UI_FLAG_HIDE_NAVIGATION) enables a newimmersive full-screen mode. While immersive full-screen mode is enabled, your activity continues to receive all touch events. The user can reveal the system bars with an inward swipe along the region where the system bars normally appear. This clears the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag (and theSYSTEM_UI_FLAG_FULLSCREEN flag, if applied) so the system bars remain visible. However, if you'd like the system bars to hide again after a few moments, you can instead use the SYSTEM_UI_FLAG_IMMERSIVE_STICKY flag.

二:Translucent system bars

You can now make the system bars partially translucent with new themes, Theme.Holo.NoActionBar.TranslucentDecor andTheme.Holo.Light.NoActionBar.TranslucentDecor. By enabling translucent system bars, your layout will fill the area behind the system bars, so you must also enable fitsSystemWindows for the portion of your layout that should not be covered by the system bars.

If you're creating a custom theme, set one of these themes as the parent theme or include thewindowTranslucentNavigation andwindowTranslucentStatus style properties in your theme.




扩展阅读:

android隐藏底部虚拟键Navigation Bar实现全屏


http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2013/0709/1426.html




















  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值