RecyclerView onItemClick、onItemLongClick、drag、swipe、divider RecyclerView 梳理:点击&长按事件、分割线、拖曳排序、滑动删除
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea update; Jan 31, 2018
app update; Jan 31, 2018
gradle/wrapper update; Jan 31, 2018
.gitignore Initial commit Aug 2, 2017
LICENSE Create LICENSE Dec 20, 2017
README.md update readme; Jan 31, 2018
build.gradle update; Jan 31, 2018
gradle.properties Initial commit Aug 2, 2017
gradlew Initial commit Aug 2, 2017
gradlew.bat Initial commit Aug 2, 2017
settings.gradle Initial commit Aug 2, 2017

README.md

RecyclerViewEvent

效果图  

  1. swipe and drag.拖曳 + 滑动删除
  2. drag. 拖曳 + 首个 item 固定

swipe and drag drag  

讲解

这次主要是把 RecyclerView 比较常用的基本的点,在这里集中整理一下。从这篇文章主要梳理以下几点:

  • 优雅的实现:item 点击事件 & item 长点击事件
  • RecyclerView 添加 divider 的标准姿势
  • RecyclerView 实现 item 的拖曳排序和滑动删除
  • 拖曳排序时,限制首个 item 固定的实现

详解介绍请看本项目对应的讲解文章:
RecyclerView 梳理:点击&长按事件、分割线、拖曳排序、滑动删除