摘要: 以上目前AB提供的converters包下的工具类。下面将逐一介绍。介绍前提到DependentObservable 。他可以实现类似自定义Converters的作用。文章末尾作解释。【ADAPTER】:返回一个Adapter对象。ADAPTER accepts only one argument, and it must be DynamicObject需要使用DynamicObject对象作为其参数。ADAPTER({xxxxx,xxxx}); java代码中可通过gueei.binding.collections.Utility.getSimpleAdapter调用@item temp. 阅读全文
posted @ 2013-09-03 18:35 pinotao 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Dynamic Object is an untyped Observable. -- 它是一个 非特定类型(无类型)的Observable。Dynamic Object is an Observable that contains other Observable objects -- 它包含其他 Observable 对象。It is called Dynamic because it is an object without a fixed type declaration, and it's very similar to Javascript objects. It' 阅读全文
posted @ 2013-09-03 16:58 pinotao 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 上述提到的Observable 和Command 定义在model中。在Activity初始化时 传递给Binder的构造。A Model need to have basically two types ofpublicFields:ObservableCommandObservable is a Generic type that denotes something within it isObservable, which changes to it will fire a notification to all its subscribers.数据变更时,能及时刷新相应的调用界面。Co 阅读全文
posted @ 2013-09-03 15:50 pinotao 阅读(435) 评论(0) 推荐(0) 编辑
摘要: IRowModel is the interface indicates that view model participate in Collections表明这是一个 处理集合操作的视图模型 接口。具体 声明:public interface IRowModel{ public void onAttachedToUI(int position);}Since Android is reusing views in ListView/Spinner etc, at a certain instance, not all the Models is bind to front end U... 阅读全文
posted @ 2013-09-03 11:14 pinotao 阅读(173) 评论(0) 推荐(0) 编辑
摘要: PojoViewModel 这里先mark下,简要说下概念。概要:实验性的,尝试 pojo风格的ViewModel。该子类无需Observables 和 Commands。只要声明自己的 绑定接口就好。(实现PojoViewModel接口即可) public interface PojoViewModel { PojoViewModelHelper getHelper(); void notifyPropertyChanged(String propertyName); }it is only working in flat view models (i.e.... 阅读全文
posted @ 2013-09-03 11:02 pinotao 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 前言:接触android_binding 开源框架~ 为了MVVM框架的开发。MVVM:MVVM Redefined for AndroidModel: Model in Android can be data coming from within your application (including Shared Preferences), Database (in Cursor, or via other Data Access Object) or externally (via Cursor to other Data Contract). Model 就是数据源(sp、.db... 阅读全文
posted @ 2013-09-03 10:07 pinotao 阅读(463) 评论(0) 推荐(0) 编辑