小编Saw*_*ina的帖子

在滚动视图内部卡片视图layout_height ="wrap_content"无法正常工作

我在滚动视图和内部卡片视图中添加了卡片视图我添加了首选项片段,但它只显示首选项类别标题.

在此输入图像描述

Setting.xml的

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.afollestad.appthemeengine.inflation.ATEToolbar
    android:id="@+id/toolbar"
    android:background="?attr/colorPrimary"
    app:popupTheme="@style/AppTheme.PopupOverlay"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />
<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/view"
    android:layout_below="@+id/toolbar">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <android.support.v7.widget.CardView
            android:id="@+id/card_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardElevation="4dp"
            style="?attr/CardTheme" />
    </RelativeLayout>
</ScrollView>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

任何解决方案

android scrollview android-cardview

3
推荐指数
1
解决办法
3768
查看次数

标签 统计

android ×1

android-cardview ×1

scrollview ×1