摘要: Java基础 之软引用、弱引用、虚引用 ·[转载]Java中的软引用,弱引用和虚引用 阅读全文
posted @ 2013-09-05 11:28 pinotao 阅读(137) 评论(0) 推荐(0) 编辑
摘要: http://www.codeproject.com/Articles/166952/MVVM-in-Android 原文地址。 阅读全文
posted @ 2013-09-04 18:23 pinotao 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Custom View classAll custom view requires to implement the IBindableView interface and implement the function:public ViewAttribute getViewAttribute(String attributeName) 注:最新API 是 /** * Each View Attribute should be created once only. * The Custom View is suppose to create and return the desig... 阅读全文
posted @ 2013-09-04 11:25 pinotao 阅读(166) 评论(0) 推荐(0) 编辑
摘要: AB 支持绑定 Collectionpublic class ArrayListObservable extends ObservableCollection implements Collection示例:The constructor is pretty much similar to simple observable properties, notice you must pass the class of the generic type to it (just like observables).public ArrayListObservable NameOfList = ... 阅读全文
posted @ 2013-09-04 11:05 pinotao 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 以上目前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) 编辑