根据API说明可以知道:
boolean Return false to allow normal menu processing to proceed, true to consume it here.
onOptionsItemSelected的返回值意思:
- true表示该方法执行完毕后,点击事件不会再向下一个事件处理方法传递了。
- false表示执行完该方法后,点击事件继续向下传递。
有点像责任链的滋味。。。
参考链接:http://blog.csdn.net/flowingflying/article/details/11926463
本文详细解释了onOptionsItemSelected方法的返回值含义:true表示点击事件在此被消费不再传递,false则继续传递。类似于责任链模式。
2862

被折叠的 条评论
为什么被折叠?



