修改 recyclerview item 布局如下

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 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="140dp"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp">

<ImageView
android:id="@+id/img_recy_item_1_pic"
android:layout_width="140dp"
android:layout_height="match_parent"
android:scaleType="centerCrop" />

<TextView
android:id="@+id/tv_recy_item_1_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_toRightOf="@id/img_recy_item_1_pic"
android:textSize="23sp" />
( http://www.my516.com)
<TextView
android:id="@+id/tv_recy_item_1_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="16dp"
android:layout_marginBottom="8dp"
android:layout_toRightOf="@id/img_recy_item_1_pic"
android:textSize="18sp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
---------------------

posted @ 2019-08-12 21:14  李艳艳665  阅读(364)  评论(0编辑  收藏  举报