Code Monkey home page Code Monkey logo

treestructureview's Introduction

TreeStructureView 树形层级展开分支小控件

演示demo截图:

screenshot

根gradle中 dependency 加入:

project/build.gradle:

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://dl.bintray.com/mrmarktoo/maven" }
    }
}

项目中引入依赖:

app/build.gradle:

dependencies {
    implementation "com.marktoo.widget:cachedweb:1.0.0.0"
}

控件的属性:

<declare-styleable name="DashTreeView">
        <!--虚线还是实线-->
        <attr name="isDash" format="boolean" />
        <!--虚线每段长度-->
        <attr name="dashW" format="dimension" />
        <!--虚线间距长度-->
        <attr name="dashH" format="dimension" />
        <!--虚线宽度-->
        <attr name="lineW" format="dimension" />
        <!--颜色-->
        <attr name="lineCo" format="color" />
        <!--视图模式 主要是切换这个模式来显示不同的分支状态-->
        <attr name="mode" format="integer" />
</declare-styleable>

mode可用的值范围:

    /**
     * 线模式
     * 0:normal 默认一条横线
     * 1:expand T字展开
     * 2:middle son 展开项中,中间项分支向右的T字
     * 3:end son 展开项末尾项
     * 4:vertical line 第三级项设置,同时展开多个二级组时使用
     * 5:no line 没有任何显示
     */

treestructureview's People

Contributors

mrmarktoo avatar

Stargazers

daxiong avatar  avatar

Watchers

James Cloos avatar  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.