Drawing ViewGroup content on a SurfaceView/SurfaceHolder Can

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Drawing ViewGroup content on a SurfaceView/SurfaceHolder Can

Postby ztsyed » Sun Mar 15, 2009 9:36 pm


Wanted to know if its possible to draw ViewGroup contents on SurfaceView/SurfaceHolder canvas? I'm trying to achieve fast 2D animation (using SurfaceView) alongside Android UI components on the screen.

Since SurfaceView punches a hole in the app window, I tried creating SurfaceView, and inside there I created LinearLayout and added couple of controls (Button and ImageView). Now I tried calling mLayout.draw (canvas) from SurfaceHolder canvas, it doesn't render anything. Am i missing something here?

I wonder if that would yield better performance then calling invalidate from Activity.runOnUiThread().

Please advice.

Posts: 2
Joined: Fri Feb 27, 2009 11:53 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests