本文介绍了如何加快android系统中连续图像的显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正尝试从另一个移动接收和显示视图的应用程序。当收到的意见,我将其转换为位图,并使用ImageView的像显示它们
imageView.setImagebitmap(XXX)。然而,我发现了API的表现并不好。

Currently, I am trying an application for receive and display views from another mobile. When views received, I will convert it as a bitmap, and use ImageView to display them like imageView.setImagebitmap(xxx). However, I found the API performance is not good.

当我需要显示的图像连续(不是视频),有没有加快的显示方式?

As I need display the continous images (not a video), is there any method to speed up the display?

感谢您

推荐答案

您应该考虑使用的代替的ImageView 。每次通话时间 ImageView.setImageBitmap 创建和查看自己新的 BitmapDrawable 实例无效,所以这是相当沉重的方式快速切换图像。

You should consider using SurfaceView instead of ImageView. Every time you call ImageView.setImageBitmap new BitmapDrawable instance is created and view itself is invalidated so this is quite heavy way for switching images rapidly.

此外,如果你需要绘制您可以通过禁用位图筛选。

Also if you need to scale bitmap before drawing you can dramatically increase framerate by disabling bitmap filtering.

这篇关于如何加快android系统中连续图像的显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 09:02