小编Blu*_*ord的帖子

不是DRM文件,正常开放

我正在寻找一个关于通过调用BitmapFactory.decodeFile引起的重复日志打印的解决方案.

在我的应用程序中,我ListView每秒钟都会重新绘制一个计时器.在ListView具有ImageView该获取是来自本地存储的图像源,(而不是从网络)

图像存储在:

filePath = /data/data/com.xxx.testlib/files/b22a1a294fd6e5ad3ea3d25b63c4c735.jpg
Run Code Online (Sandbox Code Playgroud)

我使用以下代码重绘图像,它工作正常.没有例外.

try
{
 File filePath = context.getFileStreamPath(imageName);

 if(filePath.exists()){

    bMap = BitmapFactory.decodeFile(filePath.getPath());

 }

}catch (Exception e) 
{

 e.printStackTrace();

}
Run Code Online (Sandbox Code Playgroud)

但是在执行以下行时:

bMap = BitmapFactory.decodeFile(filePath.getPath());
Run Code Online (Sandbox Code Playgroud)

我在日志中得到如下打印:

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 
....
Run Code Online (Sandbox Code Playgroud)

如何从打印到日志中读取.

谢谢你

编辑

每当执行此操作时,它也会滞后于手机.这种降低的性能特别明显,特别是当手机正在Waked up使用此代码返回活动时.

它已超过一年的OP,但仍未找到答案.如果有人找到解决方案,请发布.

谢谢.

android imageview android-view android-bitmap

13
推荐指数
1
解决办法
5495
查看次数

标签 统计

android ×1

android-bitmap ×1

android-view ×1

imageview ×1