Giter VIP home page Giter VIP logo

leekailklk / treeview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from q1113225201/treeview

0.0 1.0 0.0 466 KB

一个可展开收拢、可选中、可响应单项点击事件的树形列表, 可以根据自己需要去实现每个节点下的布局,继承库里面的节点对象和视图绑定类即可, 在适配器的展开、选中和单项点击回调中实现需要的效果。

Java 100.00%

treeview's Introduction

TreeView

这是一个功能多样的自定义树形列表,在使用RecyclerView实现树形列表,并在其基础上附加了一些额外功能。

基本功能:

  • 展开收拢,收拢后保持子节点展开收拢状态(1.0.1实现)
  • 响应点击事件(1.0.1实现)

附加功能:

  • 自定义每个节点的布局,自定义每个节点所保存的数据(1.1.0实现)
  • 选中功能,响应选中事件,可设置选中子节点后是否选中父节点(1.1.0实现)
  • 全部展开(展开列表中数据,不响应节点展开事件)和全部收拢功能(1.1.0实现)
  • 将展开收拢细分成(1.2.0实现):
    • 点击展开收拢后事件响应toggleClick(可在此请求该节点下孩子节点数据,并添加到当前结点下)
    • 列表展开或收拢toggle
    • 展开后事件响应toggled(节点箭头旋转等)

添加依赖

仓库

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

(最新版本)

compile 'com.github.q1113225201:TreeView:1.2.0'

具体使用可参考博客项目中MainActivity.java

效果展示

url

treeview's People

Contributors

q1113225201 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.