github android客户端源码读后感

看过源码之后,其实收获有限。因为其使用的底层框架与一直在用的框架很相似,所以就没有那种值得仔细研究的架构上的可以学习的东西。不过一些写法上的东西还是可以参考的!!

example就是在每个activity中写个static public createIntent(args),这样别的activity想调到这个activity的话,就不需要知道所传参数具体名称是什么,以免写错

1     public static Intent createIntent(Context context, String username, String password) {
2         Intent intent = new Intent(context, TwoFactorAuthActivity.class);
3         intent.putExtra(PARAM_USERNAME, username);
4         intent.putExtra(PARAM_PASSWORD, password);
5         return intent;
6     }

 

posted @ 2014-10-22 12:13  南风又起  阅读(354)  评论(0编辑  收藏  举报