如何显示/隐藏动作条点击时 [英] How to show/hide Actionbar when clicked on
本文介绍了如何显示/隐藏动作条点击时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当用户点击屏幕上的任何位置,我想的动作条隐藏,当$ P $再次pssed应该重新出现。
When the user clicks anywhere on the screen, I want the Actionbar to hide and when pressed again it should reappear.
我知道有个东西叫actionbar.hide();和节目,但可以请你帮助我如何实现它? :)
I know there is something called actionbar.hide(); and show, but can you please help me how to implement it? :)
推荐答案
刚刚隐藏():
getActionBar().hide();
当你想隐藏它,并使用显示() >:
when you want to hide it, and use show():
getActionBar().show()
当你想表现出来。这就是它。
when you want to show it. That's about it.
请记住,如果你使用<一个href="http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_FULLSCREEN">View.SYSTEM_UI_FLAG_FULLSCREEN,这将无法正常工作。
Remember that if you're using View.SYSTEM_UI_FLAG_FULLSCREEN, this will not work properly.
这篇关于如何显示/隐藏动作条点击时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文