简体   繁体   English

隐藏Android屏幕底部的导航栏“更多”按钮

[英]hide the navigation bar “more” button at the bottom of the screen on Android

On my application, I have, on some devices (such as the HTC One) a bar containing only the "More" button (eg : three vertical dots). 在我的应用程序中,我在某些设备(例如HTC One)上只有一个包含“更多”按钮的栏(例如:三个垂直点)。 Example below with the Amazon app that gets the same behavior. 以下示例与获得相同行为的Amazon应用程序相同。

出现三个点

I tried to remove it, by adding this on my manifest : 我试图通过在我的清单上添加它来删除它:

<application
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" > </application>

It didn't work. 它没用。 I also tried to change the visibility of the displayed view : 我还试图改变显示视图的可见性:

View v = this.findViewById(android.R.id.content);
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

But it only works when displaying the activity. 但它仅在显示活动时有效。 When I interact on my view, the navigation bar reappers. 当我在我的视图上进行交互时,导航栏会重新启用。

I noticed that this navigation bar does not appear on a Galaxy S III nor on a Galaxy S II. 我注意到这个导航栏没有出现在Galaxy S III上,也没有出现在Galaxy S II上。 Can this navigation bar only be displayed only because of the large resolution of the HTC One screen ? 仅显示此导航栏只是因为HTC One屏幕的分辨率较高?

Is there any way to remove this bar only when it appears ? 有没有办法只在它出现时删除此栏?

Set your android:targetSdkVersion to be 14 or higher. android:targetSdkVersion设置为14或更高。 See this blog post of mine from a year or so ago for more details. 有关详细信息,请查看一年前的博文

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM