Giter Site home page Giter Site logo

maoruibin / viewcontroller Goto Github PK

View Code? Open in Web Editor NEW
122.0 9.0 26.0 482 KB

:pushpin: A view controller manages a set of views that make up a portion of your app’s user interface,it aims to make ui develop change more clear and flexible.(ViewControler 是一种界面开发组件化实现方式,利用它可以将一些复杂的 UI 界面开发组件化.)

License: Apache License 2.0

Java 80.08% FreeMarker 19.92%
components flexible viewcontroller android

viewcontroller's Issues

一些建议

很明显,你想做的事(所谓的 Layout 解块)和 ViewGroup 重叠了。你自己创造了个所谓「ViewController」的概念,然而这东西不和 View/Fragment 一样能融入到 Android 的开发生态中。

更好的解块法是当然直接继承 ViewGroup(当然你要加 fillData 方法也是行的)。

为什么不直接把不同的几个模块封装成View?

作者的想法很nice,将复杂界面模块化,我有个疑问:

为何要把几个模块自定义成普通class(例如HouseCommentViewController ),而不是直接封装成View(例如HouseCommentView),然后在Activity中直接动态添加这些View即可,View有自己的生命周期(onDestroy中的释放操作就可以放到View的onDettachWindow),并且可以直接拿到context(不需要额外传进去)

No adapter attached; skipping layout

背景条件是:在一个view中加入两个ControllerView对象,他们都 是new 的同一个继承ControllerView.的对象。
然后在ControllerView处理数据中。第一个ControllerView的adapter有数据。第二个ControllerView出现 No adapter attached; skipping layout

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.