在CorodvaWebView中向上滚动时隐藏操作栏会留下额外的空白区域

时间:2017-01-20 05:43:29

标签: android cordova layout

我在我的应用程序中使用cordova。如果Cordova Webview向下滚动,我想创建可以隐藏的操作栏。现在,如果我向下滚动,ActionBar就会隐藏起来。然而,它正在留下白色空间甚至坚硬它完全隐藏。

    <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background_white"
    android:fitsSystemWindows="true">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <RelativeLayout
                android:id="@+id/content_frame"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
            android:fitsSystemWindows="true">
        </RelativeLayout>
        <include layout="@layout/se_action_bar" />
    </FrameLayout>
</android.support.v4.widget.DrawerLayout>

这就是我的观点。请帮帮我。

se_action_bar.xml代码

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:background="@color/blue_background"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
    >

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/home"
        android:src="@drawable/icon_home"
        android:layout_alignParentTop="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:padding="4dp"/>

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/clear_cookies"
        android:src="@drawable/icon_clear_cache"
        android:layout_alignParentTop="true"
        android:layout_toLeftOf="@+id/home"
        android:layout_toStartOf="@+id/home"
        android:padding="4dp"/>
    </RelativeLayout>
</android.support.v7.widget.Toolbar>

0 个答案:

没有答案
相关问题