如何改变Android的切换到全屏模式时,状态栏删除动画 [英] how to remove statusbar animation when changing to fullscreen in Android

查看:1575
本文介绍了如何改变Android的切换到全屏模式时,状态栏删除动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


动画,但不能立即消失。那么,如何可以使
状态栏立即消失?如果需要改变的框架,在哪里
它?

when i change my activity to fullscreen, the statusbar performs an animation,but not disappear immediately. so how can i make the statusbar disappear immediate ? if need to change framework , where is it?

推荐答案

我已经找到解决办法。

我们可以出活性以下code,从中我们也创建和启动意图

we can out following code in activity from which we are creating and starting Intent

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Intent scanIntent = new Intent(this, SecondActivity.class);
startActivity(scanIntent);

通过这样它会隐藏状态栏第一个那么它会移动到下一个活动。

By this it will hide status bar first then it will move to next activity.

以上code时,使用的是单实例次活动仅需要。
否则,你可以应用维内特舒克拉给出的解决方案

Above code will require only when you are using single instance for second activity. else you can apply solution given by Vineet Shukla

这篇关于如何改变Android的切换到全屏模式时,状态栏删除动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆