gpt4 book ai didi

android - 应用栏上方的空白区域

转载 作者:行者123 更新时间:2023-11-29 19:01:26 25 4
gpt4 key购买 nike

如何去掉下面显示的空白区域(水平红线之间的空间)?在我买了一部新手机 (Samsung S8) 之前,我没有在我的应用程序上看到这一点,它的垂直屏幕空间比我的旧 HTC One 更大。

app screenshot

该 Activity 的布局文件的开头是:

<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 ...

我的values-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 上看起来一样):

emulator screenshot

当我在我的 Samsung S8 上运行时,我希望该应用程序的行为与上述相同(即操作栏上方没有黑色空间)。我需要更改什么?

最佳答案

更改此 <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">

 <style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar">

希望这对您有所帮助,如果没有请发布您的完整 xml 文件

乐于助人

关于android - 应用栏上方的空白区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48960080/

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