QQ视差特效和ListView侧滑删除
2016-02-19 17:23
357 查看
如图所示是效果图,当向下拉时,图片会被拉出来,松手后恢复。和ListView的侧滑删除
View Code
<?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
相关文章推荐
- codevs 4633 [Mz]树链剖分练习
- JSP页面与JSP页面之间传输参数出现中文乱码的解决方案
- >/dev/null 2>&1
- Lua实现在字符之间插入指定字符
- 3143: [Hnoi2013]游走 概率与期望 高斯消元解期望方程组
- 解析Java的迭代器中的fast-fail错误检测机制
- 4000 今天碰到一个PHP配置问题
- Linux权限基础及常用命令(CentOS)
- Eclipse不能自动联想类成员的解决方法之一
- React Native For Android On Windows
- Xutils和Xutils3的基本使用
- C语言 百炼成钢17
- poj2676——Sudoku(深度搜索)
- redis3.0.0 集群安装详细步骤
- nginx+tomcat取得远程用户IP问题的解决办法
- google maps js v3 api教程(1) -- 创建一个地图
- lua中实现倒计时
- VS 2008 打开SDF数据库文件
- 【提高】面试五
- Jquery(JS)中.height()和.innerHeight(),outerHeight()的差别