SurfaceView of type PUSH_BUFFERS

I have some experience with the SurfaceView. To prevent unneeded redrawing, I always use a countdown variable which tells the thread how often the view should be drawn.

countdown > 0 : draw ? doNothing

However I was thinking about changing that to use a "push surface". So just push a buffer to the surface and show that instead of setting a countdown variable everywhere in my project.

My problem is that I can't find a good tutorial/resource where the usage is described. Currently I have something like this:

// panel is the SurfaceView
c = panel.getHolder().lockCanvas(null);
synchronized (panel.getHolder()) {

I have no idea on how to get the canvas to draw on when I can't use lockCanvas() as mentioned in the documentation.


This question is obsolete after making the surface types deprecated. So it isn't used anymore...

Need Your Help

Is it possible to avoid SuperViews when hitTesting?

iphone ios ipad frame hittest

Basically, I want to be able to click all the Subviews in the Image below...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.