如何在android中减少cardview之间的大小

如何在android中减少cardview之间的大小,android,android-cardview,Android,Android Cardview,首先,对不起,或者我的英语不好,如何在android中减小我的卡片视图大小我的卡片视图大小与左边框和右边框大小相同帮助我以及如何放置文本中心状按钮 这里是我的XML代码 <android.support.v7.widget.CardView android:layout_width="fill_parent" android:layout_height="fill_parent" card_view:cardCornerRadius="3dp" androi

首先,对不起,或者我的英语不好,如何在android中减小我的卡片视图大小我的卡片视图大小与左边框和右边框大小相同帮助我以及如何放置文本中心状按钮

这里是我的XML代码

<android.support.v7.widget.CardView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    card_view:cardCornerRadius="3dp"
    android:layout_marginTop="6dp"
    android:layout_marginLeft="6dp"
    android:layout_marginRight="6dp"
    card_view:cardElevation="0.001dp"
    android:layout_marginBottom="0dp">
    <RelativeLayout
        android:id="@+id/top_layout"
        android:layout_width="fill_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/img_thumbnail"
            android:layout_width="fill_parent"
            android:layout_height="160dp"

            android:scaleType="centerCrop"

            />



    <TextView
        android:id="@+id/tv_nature"
        android:layout_width="fill_parent"
        android:layout_height="25dp"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="2dp"
        android:paddingBottom="2dp"
         android:layout_marginTop="25dp" 
        android:layout_marginBottom="25dp"
        android:alpha="0.8"
        android:textColor="#24B9FE"
        android:gravity="start"
        android:textSize="15sp"
        android:textStyle="bold"
        android:text="Test Test Test Test Test Test Test"
        android:layout_below="@+id/img_thumbnail"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentBottom="true" />

    <Button
        android:id="@+id/button1"
        android:layout_width="40dp"
        android:layout_height="20dp"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@+id/tv_nature"
        android:layout_marginRight="31dp"
        android:background="#24B9FE"
        android:text="Book"
        android:textColor="#ffffff" />

    </RelativeLayout>
</android.support.v7.widget.CardView>

你能展示你的
回收视图
xml吗?我正在使用listView@ArturSzymanskiI缩小了我的尺寸你能告诉我如何像我的书本按钮一样放置我的文本视图中心你在你的
列表视图中使用了分隔符属性吗?我的意思是这样的:
android:divider=“…”
android:dividerHeight=“…”
是的,它可以工作,但是如何将我的文本中心像我的Button@ArturSzymanski你能展示你的
RecyclerView
xml吗?我正在使用listView@ArturSzymanskiI缩小了我的尺寸你能告诉我如何像我的书本按钮一样放置我的文本视图中心你在你的
列表视图中使用了分隔符属性吗?我的意思是:
android:divider=“…”
android:dividerHeight=“…”
是的,它可以工作,但是如何像我的Button@Artur西曼斯基