| Version 7 (modified by liaojiaohe, 12 years ago) (diff) |
|---|
Q:assets与res/raw的不同?
A: 简单来说assets用于存放需要打包到应用程序的静态文件,以便部署到设备中,支持任意深度的子目录,这些文件不会生成任何资源ID,
访问的时候需要AssetManager类,使用/assets开始(不包含它)的相对路径名。
AssetManager am = null;
am = getAssets();
InputStream is = am.open("filename");
res/raw中的文件会被映射到R.java文件中,访问的时候直接使用资源ID即R.id.filename;
InputStream is =getResources().openRawResource(R.id.filename);
Q:Android异步处理方式? 优缺点
A: 处理一:使用Thread+Handler实现非UI线程更新UI界面
处理二:使用AsyncTask异步更新UI界面
处理三:Handler+Looper+MessageQueue?
Q: 要不要通过标注缩减初始化代码?像 roboguice, AndroidAnnotations, butterknife
Q:是否需要是用DAO
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)