Transparent Background Pixels in Corona Android GLSurfaceView?

Is it possible to draw transparent background pixels in the Corona GLSurfaceView?

I would interested in placing a custom SurfaceView behind Corona’s GLSurfaceView, with Corona overlaying my custom view.  The custom view would be inserted into the FrameLayout behind the Corona view (using Enterprise) and visible through the GLSurfaceView transparent pixels.

I don’t see how this is currently possible, but wanted to check with the ninjas just in case.

Thanks for any insight! Mark

This is not something that we currently support.  Right now, we only have a “CoronaActivity” class and we do not support a Corona view that you can add to your own activity.

If you’re feeling brave and already have Corona Enterprise, then can try experimenting with the views under the CoronaActivity for yourself.  I will tell you that the root content view is a FrameLayout and the first view inside the FrameLayout is our GLSurfaceView.  If you can get a hold of the root content view from our activity (Android doesn’t make this easy, so it’s a task for you), then you can insert your own view behind our GLSurfaceView.  Also, I know that our GLSurfaceView is *not* set up to be transparent, so you would have to change it yourself.  And after saying all of that, I have no idea if any of this is going to work for you.  You’re kind of on your own from here, but you’re welcome to experiment.

That said, we are currently experimenting with making Corona into a View class on Android, but it’s experimental and there is no ETA.

Anyways, I hope this helps.

Thanks Joshua, I appreciate the quick response and all of the great details.  I’m not an enterprise user yet, but may make the jump and experiment a bit.  Awesome SDK’s that you guys have made, glad to hear that you are experimenting with new ideas.

Happy to help!

If you do given the trial version of Corona Enterprise a try, you should have a look at its “ExtendingUI” and “SimpleLuaExtension” sample projects.  One shows you how to display/integrate Android native UI onto the CoronaActivity easily and the other shows you how to add your own Lua APIs in Java.

And if it helps you any, you can find our native APIs for our Corona Enterprise libraries via the links below.

   http://docs.coronalabs.com/daily/native/index.html

   http://docs.coronalabs.com/daily/native/android/html/overview-summary.html

This is not something that we currently support.  Right now, we only have a “CoronaActivity” class and we do not support a Corona view that you can add to your own activity.

If you’re feeling brave and already have Corona Enterprise, then can try experimenting with the views under the CoronaActivity for yourself.  I will tell you that the root content view is a FrameLayout and the first view inside the FrameLayout is our GLSurfaceView.  If you can get a hold of the root content view from our activity (Android doesn’t make this easy, so it’s a task for you), then you can insert your own view behind our GLSurfaceView.  Also, I know that our GLSurfaceView is *not* set up to be transparent, so you would have to change it yourself.  And after saying all of that, I have no idea if any of this is going to work for you.  You’re kind of on your own from here, but you’re welcome to experiment.

That said, we are currently experimenting with making Corona into a View class on Android, but it’s experimental and there is no ETA.

Anyways, I hope this helps.

Thanks Joshua, I appreciate the quick response and all of the great details.  I’m not an enterprise user yet, but may make the jump and experiment a bit.  Awesome SDK’s that you guys have made, glad to hear that you are experimenting with new ideas.

Happy to help!

If you do given the trial version of Corona Enterprise a try, you should have a look at its “ExtendingUI” and “SimpleLuaExtension” sample projects.  One shows you how to display/integrate Android native UI onto the CoronaActivity easily and the other shows you how to add your own Lua APIs in Java.

And if it helps you any, you can find our native APIs for our Corona Enterprise libraries via the links below.

   http://docs.coronalabs.com/daily/native/index.html

   http://docs.coronalabs.com/daily/native/android/html/overview-summary.html