简体   繁体   中英

Surfaceview in listview scrolling issue

我有一个问题。我正在开发一个基于surfaceview的控件,我将其称为“图形”。在此控件中我绘制一条路径(想象一个正弦函数)。这个控件工作正常。现在我想要我的应用程序将能够显示此图形控件的多个实例。我正在考虑使用listview控件来包含它们。我实现了它,但是当我滚动它时我遇到了问题。看起来listview中的adiacent图项重叠了每个另外,因为它没有正确刷新。你怎么看待使用listview的解决方案?解决这个问题的任何解决方案或替代方案?提前感谢.Paolo

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM