摘要: Android系统就是一个回调的系统,为什么使用回调来设计呢?回调的好处在于你不需要了解其他的东西,而只需要把自己关注的回调函数准备好,剩下的事情就可以不用管了,这样写的话,基本上实现了功能的隔离,回调函数永远不知道其他的事情,他只需要关注自己要做什么事情即可。其他的功能就像是一个黑匣子,这样的设计是针对接口的设计,只要接口不改变,Android系统的SDK更新也不会影响以前开发的程序。 阅读全文
posted @ 2013-10-22 15:23 walkabc 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Starting Activities and Getting ResultsThestartActivity(Intent)method is used to start a new activity, which will be placed at the top of the activity stack. It takes a single argument, anIntent, which describes the activity to be executed.Sometimes you want to get a result back from an activity whe 阅读全文
posted @ 2013-10-22 15:18 walkabc 阅读(224) 评论(0) 推荐(0) 编辑