No a surface view punches a whole through your window at its location to let the surface be seen. Its whole point is that you have complete, direct access to the surface/pixels inside of it. If you are wanting to do something like this, you might want to think about whether you want a surface view at all. I have been getting the impression that a number of people are using it just because it sounds like it will let them draw outside of updates... that's not really its purpose, it's a specialized API for things like video playback, high performance games, etc, things that want to render all of the pixels themselves.
On Fri, Mar 27, 2009 at 12:13 AM, Dan Raaka <[email protected]> wrote: > > In the APIDemos > > protected void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > > // Create our Preview view and set it as the content of our > // Activity > mGLSurfaceView = new GLSurfaceView(this); > mGLSurfaceView.setRenderer(new CubeRenderer(false)); > setContentView(mGLSurfaceView); > } > > works fine as expected .. however .. adding a line like > protected void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > > // Create our Preview view and set it as the content of our > // Activity > mGLSurfaceView = new GLSurfaceView(this); > mGLSurfaceView.setBackgroundColor(Color.RED); > //mGLSurfaceView.setBackgroundResource(R.drawable.sample01); > mGLSurfaceView.setRenderer(new CubeRenderer(false)); > setContentView(mGLSurfaceView); > } > Does render on the screen as if the background was over-layed on top > of the cube !! I suspect the cube is still being rendered but behind > the RED background. > > Is there a way to set the background of the SurfaceView just like a 2D > view ? > > -Dan > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

