如何在 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试在清单文件的活动标记中添加
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
。编辑:
在调用
setContentView ()
进行设置之前,在onCreate()
中使用requestWindowFeature(Window.FEATURE_NO_TITLE)
以编程方式。try
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
in the activity tag in your manifest file.Edit:
Use
requestWindowFeature(Window.FEATURE_NO_TITLE)
in youronCreate()
before you callsetContentView ()
to set programmatically.我已经找到解决方案。
我们可以在我们正在创建和启动 Intent 的活动中输出以下代码,
这样它将首先隐藏状态栏,然后它将移动到下一个活动。
仅当您使用单实例进行第二个活动时才需要上面的代码。
否则你可以应用 Vineet Shukla 给出的解决方案
I have found solution.
we can out following code in activity from which we are creating and starting Intent
By this it will hide status bar first then it will move to next activity.
Above code will require only when you are using single instance for second activity.
else you can apply solution given by Vineet Shukla