永久隐藏标题栏(Permanently hide title bar)

我想永久隐藏标题。 我的意思是:当我隐藏标题栏然后滑动时,我看到我的标题栏。所以,我想要滑动, 不到我的标题栏。 我试过使用onKeyDow()但它没有用。 有人知道怎么做吗? 这是我隐藏标题栏的方式:

this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

这是onKeyDown()方法:

@Override public boolean onKeyDown(int keyCode, KeyEvent event){ return false; }

I want to permanently hide title. I mean: when I hide title bar and then swipe I see my title bar.So, I want to swipe and do not see my title bar. I've tried to use onKeyDow() but it didn't work. Do somebody have any idea how to do this? This is how I hide title bar:

this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

And this is onKeyDown() method:

@Override public boolean onKeyDown(int keyCode, KeyEvent event){ return false; }

最满意答案

永久禁用或隐藏状态栏(称为status bar ,而不是标题栏)或导航键在系统上存在巨大的安全漏洞。 这将允许恶意应用程序劫持系统。 所以答案是:

不,你做不到!

Permanently disable or hide the status bar (it's called status bar, not title bar) or the navigation Keys would have a huge security flaw on the system. That would allow malicious applications to hijack the system. So the answer is:

No, you cannot do that!

更多推荐