【发布时间】:2023-03-23 19:00:01
【问题描述】:
正如你们从上图(屏幕底部的蓝色区域)看到的那样,在使用谷歌地图时,导航视图不会填满所有父母的高度,屏幕底部有一个额外的空间。可能是什么原因?
请帮帮我:)
这是我的 xml 代码:
<android.support.v4.widget.DrawerLayout
android:background="@color/white"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lastupdate"
android:layout_gravity="right"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:textColor="@color/material_red_a400"/>
</FrameLayout>
</LinearLayout>
<!-- The navigation drawer -->
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/drawer_header"
app:menu="@menu/my_navigation_items"
android:background="@color/white"
app:itemBackground="@drawable/menu_item_ripple">
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
【问题讨论】:
标签: android drawerlayout navigationview