Giter Club home page Giter Club logo

demo_tree_view's Introduction

鉴于在实际开发中,经常碰到这类问题,服务端返回的动态的多层级数据结构如何适配android的UI?本demo抽取了帮朋友公司做的一个类似PC端异构目录的功能,解决了比较复杂的动态的数据层级在手机UI中的展示,比较考验数据结构知识以及递归算法的灵活运用,本demo引用了鸿洋的一个多级列表http://blog.csdn.net/lmj623565791/article/details/40212367

  1. 效果及数据结构示意图   效果图展示


数据结构示意图


  1. 碰到的问题   数据解析。数据的层级是动态的,每次返回的department下面具体还有几层架构是不固定的,且数据比较繁杂
    数据适配listView

  1. 解决问题 解决数据解析问题


递归算法解决适配问题

demo_tree_view's People

Contributors

wangyubao avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.