Android棒棒糖视图高度不';不合适的屏幕

Android棒棒糖视图高度不';不合适的屏幕,android,android-layout,android-5.0-lollipop,Android,Android Layout,Android 5.0 Lollipop,我正在努力使一个应用程序,目标是API级别18,以支持至少棒棒糖级别21,但我遇到了一个图形问题。当以API级别21+为目标时,屏幕上的视图似乎太大,应用程序的底部被屏幕上的按钮截断: XML定义为: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="m

我正在努力使一个应用程序,目标是API级别18,以支持至少棒棒糖级别21,但我遇到了一个图形问题。当以API级别21+为目标时,屏幕上的视图似乎太大,应用程序的底部被屏幕上的按钮截断:

XML定义为:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <include
        layout="@layout/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >

            <FrameLayout
                android:id="..."
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_above="@android:id/tabs" >

            </FrameLayout>

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true" >
            </TabWidget>
        </RelativeLayout>
    </TabHost>

</LinearLayout>


有人知道我做错了什么吗?

在v21 style.xml中试试这个

<item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowTranslucentNavigation">true</item>
    <item name="android:fitsSystemWindows">true</item>
true
真的
真的

您可能还对android:layout\u height=“match\u parent”感兴趣,尝试更改android:layout\u height=“match\u parent”来填充您的父对象parent@KaranMer我还以为填充父对象在API级别8中被弃用了呢?如果一切都这么容易,似乎仍然表现出同样的行为。谢谢