本文介绍了闪屏 - getActionBar()隐藏仍然闪烁一秒钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现一个splashcreen,我不希望使用一个新的活动的启动画面,

I am trying to implement a splashcreen and I dont want to use a new activity for the splashscreen,

所以我设置可见=消失在我的列表视图,隐藏动作条,假标识的知名度=可见,睡眠一段时间,然后再次显示动作条,设置列表视图的可视性回到可见

So I set visibility=gone on my listview, hide actionbar, leave the logo visibility=visible, sleep for a certain period and then show the actionbar again and set the listview visibility back to visible

这个工作,但有处于起步一瞬间,当动作条仍然可见之前它被隐藏

This works, however there is a brief moment at the start when the actionbar is still visible before it gets hidden

有没有办法来解决这个问题,并有动作条从一开始走了吗?

Is there a way to fix this and have the actionbar be gone from the beginning?

我使用ActionBarSherlock和Galaxy S3的4.1果冻豆。

I am using ActionBarSherlock and Galaxy S3 with 4.1 Jelly Bean.

感谢

推荐答案

没有。有没有办法做到这一点,而无需使用两个单独的活动。

No. There is no way to do this without using two separate activities.

操作栏被初始化为装饰观点恰好远远早于你的的onCreate 方法的一部分。这意味着将有你描述它可以隐藏前明显的滞后。如果你想永远隐藏它,你可以这样做用一个主题或窗口标志,但一旦你做,有没有办法让它出现。

The action bar is initialized as part of the decor view which happens much earlier than your onCreate method. This means there will be the noticeable lag that you describe before it can be hidden. If you wanted to permanently hide it you could do so using a theme or window flag but once you do that there is no way to get it to appear.

这篇关于闪屏 - getActionBar()隐藏仍然闪烁一秒钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 03:55