【发布时间】:2018-02-26 01:29:04
【问题描述】:
如何去除下图所示的空白空间(水平红线之间的空间)?直到我买了一部新手机(三星 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 上运行该应用程序时,我希望该应用程序的行为方式与上述相同(即操作栏上方没有黑色空间)。我需要改变什么?
【问题讨论】:
-
不是Actionbar吗?我认为主题需要更改为
NoActionBar才能与工具栏一起使用。
标签: android android-layout screen