views:

60

answers:

3

What is it called ( what term should i google) when flipping/tilting the phone, so that the view rotates when running android?

My (OpenGL) application crashes when I do this, are there some certain steps you should do when handling OpenGL when this occures?

Is there something else I might want to think about?

A: 

The problem is like the configuration change that occurs when the screen orientation change occurs. See Configuration Changes. You might want to tell Android that you will handle the orientation change yourself, via the configChanges attribute.

Mayra
A: 

You could try searching for "Screen rotation android" or "Screen rotation android OpenGL" since you're trying to do 3D. When the screen rotates the current surface gets destroyed and a new one gets created already accounting for the new screen dimensions.

I'd recommend looking into some sample code just to see the correct way to handle screen rotation, look for "ApiDemos.apk" in Android (it's open sourced by the way), specifically the ones who use GL", all of them handle screen rotation.

csanta