sencha touch 视图(view) activate与deactivate事件探讨

在sencha touch2.2中采用card布局

之前的需求是考虑show,hide事件发现不可取

http://www.cnblogs.com/mlzs/archive/2013/06/13/3134162.html

假设有home,list,info三个界面,监控list的activate,deactivate事件

视图展示顺序为home-》list-》info切父容器为NavigationView

从home进入到list,会触发activate事件

从list返回到home,会触发deactivate事件

从info返回到list,会触发activate事件

基本上能满足一定的需求。

不过值得注意的是,在面对比较复杂的需求时,比如说移除info页面然后再添加一个login页面,也会触发list的activate事件

原文地址:https://www.cnblogs.com/mlzs/p/3382909.html