Set ORIENTATION_LANDSCAPE and getting something like OrientationChange

Set ORIENTATION_LANDSCAPE and getting something like OrientationChange

BY 29 Jun 2013 Native Application Development

Hello,

I’m using Horizontal layout from defined XML resource. To block it in horizontal mode i’m using SetOrientation(ORIENTATION_LANDSCAPE).

Now I want to get something like OnOrientationChanged to rotate my icons when orientation is changing.

But OnOrientationChanged is not working when SetOrientation(Orientation_landscape) is used.

 

How to obtain this kind of event? Or using accelerometer is the only way….

 

Regards

 

Written by