Surfaceview在列表视图滚动发行 [英] Surfaceview in listview scrolling issue

查看:148
本文介绍了Surfaceview在列表视图滚动发行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题要问you.I'm开发基于一个surfaceview,我把它称为图。在这种控制我绘制路径控制(想象一个正弦函数)。这一控制工程fine.Now我想我的应用程序将能够显示此图control.I想使用ListView控件包含them.I实现了它的多个实例,但我有一个问题,当我滚动it.It似乎在该adiacent图​​项目列表视图相互重叠,因为它是正确的是非refreshed.What你觉得使用列表视图?任何解决方案或替代来解决这个问题的解决?谢谢advance.Paolo

i have a question for you.I'm developing a control based on a surfaceview which i called it "graph".In this control i draw a path (imagine a sinusoidal function).This control works fine.Now i want that my application would be able to show multiple instances of this graph control.I was thinking to use a listview control to contain them.I implemented it,but i have a problem when i scroll it.It seems that the adiacent graph items in the listview overlaps each other as it was non correctly refreshed.What do you think about the solution of using listview??Any solution or alternative to solve this issue?Thanks in advance.Paolo

推荐答案

您应该考虑使用刚刚View类为您的控件。 SurfaceViews是为处理器密集型渲染诸如视频和3D图形,它们非常固定到一个位置或全屏幕,他们在自己的线程中运行不与UI的其余部分很好地起作用。

You should consider using just the View class for your control. SurfaceViews are for processor intensive rendering such as videos and 3D graphics, they are ideally fixed to a location or full screen and they run in their own thread which doesn't work well with the rest of the UI.

这篇关于Surfaceview在列表视图滚动发行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆