AB_ IRowModel

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 UI.

由于 Android 在复用Views 上(如ListView/Spinner等),在一个特定的实例中。不是所有的Models会被绑定到 前端UI。  

 The onAttachedToUI()method will be called once the particular model is loaded with UI.

 

当 model 被加载到UI上时,onAttachedToUI() 方法将会被调用 (触发)。

One common scenario is you can do lazy loading only when the content is needed, for example, loading a Bitmap to the memory and display it.

 

一个常见的场景—— 你可以在数据需要显示时才去加载它。(Lazy loading)例如:加载一个bitmap对象到内存并同时显示在界面。

状态:{当完成 重构在Arrays、Cursor 上的 绑定后,移除该对象。}

 

最新可参照LazyLoadRowModel 类。提供更多的回调方法。

posted @ 2013-09-03 11:14  pinotao  阅读(173)  评论(0编辑  收藏  举报