我正在寻找有关由调用 BitmapFactory.decodeFile 引起的重复日志打印的解决方案。
在我的应用程序中,我有一个ListView
每秒被计时器重绘的内容。有ListView
一个ImageView
从本地存储获取的图像源,(不是来自网络)
图像存储在:
filePath = /data/data/com.xxx.testlib/files/b22a1a294fd6e5ad3ea3d25b63c4c735.jpg
我正在使用以下代码重绘图像,并且工作正常。毫无例外。
try
{
File filePath = context.getFileStreamPath(imageName);
if(filePath.exists()){
bMap = BitmapFactory.decodeFile(filePath.getPath());
}
}catch (Exception e)
{
e.printStackTrace();
}
但是在执行以下行时:
bMap = BitmapFactory.decodeFile(filePath.getPath());
我在日志中打印如下:
03-07 09:55:29.100: I/System.out(32663): Not a DRM File, opening notmally
03-07 09:55:29.105: I/System.out(32663): buffer returned
....
我怎样才能从打印读取到日志。
谢谢你
编辑
每当执行此操作时,它也会滞后于手机。这种性能下降特别明显,尤其是当手机处于运行状态Waked up
并且我们使用此代码返回活动时。
OP已经一年多了,仍然没有找到答案。如果有人找到解决方案,请发布。
谢谢你。