android:layout_marginLeft=“12dp”
android:layout_marginBottom=“11dp”
android:layout_toRightOf="@id/img_video_icon"
android:text=“不舔瓶盖” />
<TextView
android:id="@+id/tv_video_comment"
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_alignParentTop=“true”
android:layout_alignParentEnd=“true”
android:layout_alignParentRight=“true”
android:layout_marginTop=“10dp”
android:layout_marginEnd=“15dp”
android:layout_marginRight=“14dp”
android:drawableLeft="@drawable/image"
android:text=“36”
android:textSize=“12sp” />
<TextView
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_centerVertical=“true”
android:layout_marginRight=“27dp”
android:layout_toLeftOf="@id/tv_video_comment"
android:text=“3万次播放” />
这里添加了一个Video和一个相对布局,中间的图标和一些xml文件请参照GitHub地址
3,适配器代码
public class VideoAdapter extends CommonAdapter {
private Context mContext;
/**
-
构造函数
-
@param context
-
@param datas
-
@param layoutId
*/
public VideoAdapter(Context context,