如何实现下图中,图片部分超出listview item 的效果
item大概长这样,你看看下面的布局代码,应该有点思路了。
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="#EDEFFE"
android:padding="15dp" >
<TextView
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:background="@color/white" />
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_launcher" />
</RelativeLayout>
求答案啊,我也遇到了
其实还是在item里面 只是item里面的布局问题而已
帧布局,相对布局都能实现
图片其实还是在listview的item里面,在item的布局里面做内容布局,listview分隔线隐藏。
android:clipChildren="false"
你把图片和下面的当成一个item进行布局就行了,看起来是分开的而已。