github android客户端源码读后感

时间:2014-10-22 14:22:29   收藏:0   阅读:291

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

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     }

 

原文:http://www.cnblogs.com/dongjinwei/p/4042775.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!