移除隐藏标题栏时Android应用程序上可见的底部填充

移除隐藏标题栏时Android应用程序上可见的底部填充,android,html,css,Android,Html,Css,我一直在开发一款混合android应用程序。我有一个webview,它加载一个运行应用程序的本地html文件。 屏幕顶部有一个条形图。当我移除该条时,webview会向上移动,但不会变长,因此屏幕底部会显示一个空白 我通过添加自定义样式删除了该条 <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBa

我一直在开发一款混合android应用程序。我有一个webview,它加载一个运行应用程序的本地html文件。 屏幕顶部有一个条形图。当我移除该条时,webview会向上移动,但不会变长,因此屏幕底部会显示一个空白

我通过添加自定义样式删除了该条

<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
    </style>
还有我的activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="gazetedokuzeylul.com.gdeylul.MainActivity"
    tools:layout_editor_absoluteY="81dp"
    tools:layout_editor_absoluteX="0dp">

    <WebView
        android:id="@+id/webview"
        android:layout_width="431dp"
        android:layout_height="643dp"
        tools:layout_editor_absoluteX="0dp"
        tools:layout_editor_absoluteY="0dp" />
</android.support.constraint.ConstraintLayout>


我也要删除空间。

请尝试将
android:layout\u width
android:layout\u height
设置为
“匹配父项”

请向我们展示如何设置WebView,例如定义它的布局文件。还有-html文件是否以像素为单位定义宽度或高度?@Thomas I添加了创建webview的代码。没有html没有定义高度或宽度。设置为100%。感谢添加代码。您能不能也包括文件activity_main.xml(R.layout.activity_main所指的文件)?它在res/layout中。@Thomas是的,我添加了activity_mail.xml,很高兴我能提供帮助
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="gazetedokuzeylul.com.gdeylul.MainActivity"
    tools:layout_editor_absoluteY="81dp"
    tools:layout_editor_absoluteX="0dp">

    <WebView
        android:id="@+id/webview"
        android:layout_width="431dp"
        android:layout_height="643dp"
        tools:layout_editor_absoluteX="0dp"
        tools:layout_editor_absoluteY="0dp" />
</android.support.constraint.ConstraintLayout>