Android 百分比相对值不小于#x27;如果没有高度,则不显示

Android 百分比相对值不小于#x27;如果没有高度,则不显示,android,android-layout,android-percentrelativelayout,Android,Android Layout,Android Percentrelativelayout,我目前正在开发一个带有不同卡的应用程序,这些卡包含在NestedScollView中。但是如果我没有在cardwiew上添加属性minHeight,则什么都不会发生 XML <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_v

我目前正在开发一个带有不同卡的应用程序,这些卡包含在
NestedScollView
中。但是如果我没有在
cardwiew
上添加属性
minHeight
,则什么都不会发生

XML

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/tools"
    card_view:cardPreventCornerOverlap="false"
    card_view:cardUseCompatPadding="true"
    card_view:cardElevation="8dp"
    android:layout_margin="5dp"
    android:layout_below="@+id/emptyView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:clipToPadding="false"
    app:clipChildren="false">

        <android.support.percent.PercentRelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.weezyu.utils.custom.widget.RalewayTextView
                style="@style/WeezyuTheme.TextView"
                android:id="@+id/activitiesTitle"
                android:gravity="left|center_vertical"
                android:text="Activities"
                android:textColor="#88000000"
                android:paddingLeft="20dp"
                android:layout_height="0dp"
                android:layout_width="0dp"
                card_view:layout_widthPercent="100%"
                card_view:layout_heightPercent="10%"/>

            <android.support.v7.widget.RecyclerView
                android:id="@+id/activitiesList"
                android:layout_below="@id/activitiesTitle"
                android:layout_height="0dp"
                android:layout_width="0dp"
                card_view:layout_widthPercent="100%"
                card_view:layout_heightPercent="80%"/>

            <com.weezyu.utils.custom.widget.RalewayTextView
                style="@style/WeezyuTheme.TextView"
                android:id="@+id/activitiesAdd"
                android:layout_below="@+id/activitiesList"
                android:text="Show More"
                android:textColor="#88000000"
                android:clickable="true"
                android:background="?android:attr/selectableItemBackground"
                android:layout_height="0dp"
                android:layout_width="0dp"
                card_view:layout_widthPercent="100%"
                card_view:layout_heightPercent="10%" />
        </android.support.percent.PercentRelativeLayout>
</android.support.v7.widget.CardView>


编辑
wrap\u内容
on
PercentRelativeLayout
不起作用

应用
android:fillViewPort=“true”
NestedScrollView
不存在。应用
android:fillViewPort=“true”
NestedScrollView
不存在。