您的位置:首页 > 其它

QQ视差特效和ListView侧滑删除

2016-02-19 17:23 357 查看
如图所示是效果图,当向下拉时,图片会被拉出来,松手后恢复。和ListView的侧滑删除

<?xml version="1.0" encoding="utf-8"?>
<com.demo.sb.adapter.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sl"
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="#4000" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal" >

<TextView
android:id="@+id/tv_item_parcall"
android:layout_width="100dp"
android:layout_height="match_parent"
android:background="#666"
android:gravity="center"
android:text="call"
android:textColor="#fff" />

<TextView
android:id="@+id/tv_item_pardel"
android:layout_width="100dp"
android:layout_height="match_parent"
android:background="#f00"
android:gravity="center"
android:text="Delete"
android:textColor="#fff" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#4fff"
android:padding="5dp" >

<ImageView
android:id="@+id/item_view"
android:layout_width="80dp"
android:layout_height="80dp"
android:contentDescription="@null"
android:scaleType="fitXY"
android:src="@drawable/a" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp" >

<TextView
android:id="@+id/item_parallax_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#f00"
android:textSize="20sp" />

<TextView
android:id="@+id/item_parallax_fight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:text=""
android:textColor="#5000"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>

</com.demo.sb.adapter.SwipeLayout>


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: