FadingActionBar LinearLayout与父级不匹配

时间:2014-03-11 17:52:27

标签: android xml android-layout

我无法将我的LinearLayout带到" match_parent"正常。正如您在屏幕截图中看到的那样,底部的空白区域不应该是。如果我尝试将此背景颜色直接应用于样式,我会得到一个奇怪的结果,其中卡片本身的每个视图都填充了背景颜色。 它在我实现FadingActionBar之前有效:

device-2014-03-11-184544

我的布局:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    style="@style/AppBaseThemeCardBG"
    android:padding="@dimen/activity_standard_padding"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/eventCard"
        style="@style/nowCardStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <com.mikebdev.douala.widget.RobotoTextView
            android:id="@+id/eventDate"
            android:textColor="@color/gray"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:typeface="roboto_condensed_light"
            android:textSize="@dimen/textSizeNormal" />

        <com.mikebdev.douala.widget.RobotoTextView
            android:id="@+id/eventHead"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:maxLines="2"
            app:typeface="roboto_condensed_light"
            android:textSize="@dimen/textSizeVeryLarge" />

        <com.mikebdev.douala.widget.RobotoTextView
            android:id="@+id/eventBody"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:typeface="roboto_condensed_light" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

    </LinearLayout>

</LinearLayout>

1 个答案:

答案 0 :(得分:2)

这绝对是图书馆中的一个问题,我从未使用未填满整个视口的内容对其进行测试。

我刚刚向Maven Central推出了应该解决问题的新版本(3.1.2),请告诉我它是如何工作的。