![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android_content
文章平均质量分 69
堕落的天使
性格开朗 乐于助人
展开
-
android Intent类
1)利用Inent监听应用程序的安装、替换、删除等与包相关的Intent:Intent.ACTION_PACKAGE_INSTALLIntent.ACTION_PACKAGE_ADDEDIntent.ACTION_PACKAGE_REPLACEDIntent.原创 2011-09-26 21:06:14 · 8233 阅读 · 1 评论 -
android Context类
1)通过资源文件的名称来获得资源的id(以drawable资源为例,其他资源类似) int drawable_id = context.getResources().getIdentifier("ball_red", "drawable", context.getPackageName());或者 int drawable_id = context.getResource原创 2011-09-27 20:30:23 · 1674 阅读 · 1 评论 -
android ApplicationInfo类
1)获取apk文件的图标 public static Drawable getApkFileIcon(String apkPath, Context context) { PackageManager pm = context.getPackageManager(); PackageInfo info = pm.getPackageArchiveInfo(apkPath, Pa原创 2012-05-11 15:21:41 · 19378 阅读 · 1 评论