05 2012 档案

摘要:要点:1.定义Layout 文件 如header.xml2. 继承类FrameLayout(或者ViewGroup, 或者View)publicHeaderBar(Contextcontext,AttributeSetattrs){this(context,attrs,R.style.headerTitleBarStyle);}publicHeaderBar(Contextcontext,AttributeSetattrs,intdefStyle){super(context,attrs,defStyle);LayoutInflater.from(context).inflate(R.layo 阅读全文
posted @ 2012-05-25 18:36 Stanley.Luo 阅读(12179) 评论(0) 推荐(1)
摘要:Android LintLint 是Android ADT 16引入的优化工具,它可以扫描你的代码,帮助发现潜在的问题,例如:1.文本国际化(有些文本缺少其它语言版本)2.Layout的性能问题3.无用的多余的资源4.不一致的数组大小(在配置文件中)5.重复的图标,图片6.可用性问题(如没有为EditText指定 InputType)7.Manifest xml配置错误。安装了ADT 16后, 默认就有Lint。项目上右键-》Android Tools->Run Lint.... 阅读全文
posted @ 2012-05-15 11:11 Stanley.Luo 阅读(678) 评论(0) 推荐(0)
摘要:请参考Windows 下配置android 源码获取环境http://yuanzhifei89.iteye.com/blog/1117549注意里面的提到的源码地址android.git.kernel.org已经不可用,估计Google关闭掉了,应替换成新的https://android.googlesource.com/很多时候我们并不想下载全部源码,以下是各个子项目的源码(最新,可用地址):gitclonehttps://android.googlesource.com/device/common.gitgitclonehttps://android.googlesource.com/de 阅读全文
posted @ 2012-05-12 11:07 Stanley.Luo 阅读(6904) 评论(0) 推荐(0)
摘要:一直认为Andoid 官网是最强大,最权威的开发参考文档。里面有不少好东西,可以慢慢挖掘。今天的Tips 是:1.如果你指定了layout_weight, android:layout_width设置成0,可以提高性能。In order to improve the layout efficiency when you specify the weight, you should change the width of the EditText to be zero (0dp). Setting the width to zero improves layout performance be. 阅读全文
posted @ 2012-05-04 01:11 Stanley.Luo 阅读(274) 评论(0) 推荐(0)