家庭记账本APP目前实现了记账功能,也就是说增加功能,今天打算添加删除功能,参考着增加的代码研究,从网上查阅资料,打算实现左滑删除功能,目前学到了xml里面的HorizontalScrollView布局,可以将删除按钮隐藏在最右侧,左滑可以将其显现出来

<?xml version="1.0" encoding="utf-8"?>

<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="80dp"> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"> <TextView
android:id="@+id/tv_title"
android:layout_width="150dp"
android:layout_height="80dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp"
android:ellipsize="marquee"
android:gravity="center"
android:singleLine="true"
android:text="costTitle"
android:textSize="35sp" /> <TextView
android:id="@+id/tv_date"
android:layout_width="100dp"
android:layout_height="80dp"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/tv_title"
android:gravity="center"
android:text="costDate"
android:textSize="20sp" /> <TextView
android:id="@+id/tv_cost"
android:layout_width="100dp"
android:layout_height="80dp"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:gravity="center"
android:text="30"
android:textSize="30sp" /> <TextView
android:id="@+id/tv_delete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="delete"/>
</LinearLayout>
</HorizontalScrollView>

但这仅仅是前端显示了出来,删除功能的实现还是不行。

最新文章

  1. 谈谈document.ready和window.onload的区别
  2. SQL开发技巧(二)
  3. 如何开发一款堪比APP的微信小程序(腾讯内部团队分享)
  4. swiper 内容超出纵向滚动 解决办法
  5. Button 对 TreeView1 所有节点的全选
  6. mssql的delete用用到被delete的表的别名
  7. 暑假集训(1)第七弹 -----Oil Deposits(Poj1562)
  8. C语言:类似linux内核的分等级DEBUG宏(打印宏)
  9. window.open()具体解释及浏览器兼容性问题
  10. VMware Player安装centos
  11. 连接池报错 Proxool Provider unable to load JAXP configurator file: proxool.xml
  12. 前端笔记之JavaScript(六)让人头疼的正则表达式
  13. spring异常Unsatisfied dependency expressed through constructor parameter 0
  14. C# DataTable 转 实体类
  15. OAuth2.0的原理介绍
  16. Nginx中防盗链(下载防盗链和图片防盗链)及图片访问地址操作记录
  17. jsp配置文件数据信息读取
  18. js调试系列: 初识控制台
  19. usb_control_msg函数用法和说明
  20. 【BZOJ】3751: [NOIP2014]解方程【秦九韶公式】【大整数取模技巧】

热门文章

  1. 05 Vue项目搭建
  2. MYSQL 之 JDBC(十七): 调用函数&amp;存储过程
  3. Elasticsearch恢复备份的数据
  4. SpringBoot2 整合JTA组件,多数据源事务管理
  5. LDAP脚本批量导出用户
  6. easyui获取datagrid中的某一列的所有值
  7. 009.Nginx缓存及配置
  8. Spring声明式事务快速上手
  9. HashMap 中 get,put 方法源码实现
  10. Ubuntu Server 19.04配置静态IP