gpt4 book ai didi

android - 无法隐藏 Nexus 7 上的标题顶部栏

转载 作者:行者123 更新时间:2023-11-29 21:48:22 25 4
gpt4 key购买 nike

我的应用在 Nexus 7 上显示顶部标题栏,但我无法隐藏它。我的文件:

styles.xml

<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="MyAppBaseTheme" parent="android:Theme.Light.NoTitleBar">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>

<!-- Application theme. -->
<style name="MyAppTheme" parent="MyAppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

values-v11/styles.xml

<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="MyAppBaseTheme" parent="android:Theme.Holo.Light.NoActionBar">
<!-- API 11 theme customizations can go here. -->
</style>

values-v14/styles.xml

<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="MyAppTheme" parent="android:Theme.Holo.Light.NoActionBar">
<!-- API 14 theme customizations can go here. -->
</style>

而且我还将其添加到我的主要 Activity 中:

@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);

最佳答案

添加

  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
WindowManager.LayoutParams.FLAG_FULLSCREEN);

到您的主要 Activity 。

关于android - 无法隐藏 Nexus 7 上的标题顶部栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15120454/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com