Surfaceview in listview scrolling issue

我只是一个虾纸丫 提交于 2019-12-12 04:44:04

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/21714989/surfaceview-in-listview-scrolling-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!