如何消除下面显示的空白区域(水平红线之间的空间)?直到我买了一部新手机(三星 S8)后,我才在我的应用程序上看到这一点,它比我的旧 HTC One 具有更多的垂直屏幕空间。
该活动的布局文件的开头是:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout ...
我的值-v14/styles.xml 是
<resources>
<!--
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="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>
我尝试用谷歌搜索这个问题,但我找不到任何东西——我一定是搜索了错误的术语。我需要编辑什么文件才能使应用程序操作栏上方的空白区域消失?
编辑:为了进行比较,应用程序在模拟器中的外观如下(在我的 HTC One 上看起来是一样的):
当我在三星 S8 上运行该应用程序时,我希望该应用程序的行为与上述相同(即操作栏上方没有黑色空间)。我需要改变什么?
改变这个<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
希望这会对您有所帮助,如果没有,请发布您的完整 xml 文件
很高兴能帮助你
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)