我知道如何读取本地包资产目录中的 gif 图像。但现在我需要在其他包资产中读取其他 gif 图像。例如主APP com.aaa.app 读取资产中的com.bbb.app gif。我知道用
try {
context = this.createPackageContext("com.bbb.app",
Context.CONTEXT_IGNORE_SECURITY);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
AssetManager am = context.getResources().getAssets();
try {
InputStream is = am.open(fileName);
image = BitmapFactory.decodeStream(is);
is.close();
} catch (IOException e) {
e.printStackTrace();
}
阅读 jpg/png,但我想阅读 gif 使用 Fresco lib。有人知道该怎么做吗?