In android it is possible to lock the screen orientation by adding this to the manifest :
android:screenOrientation="landscape"
But is it possible to lock within the size?
I want my app to be locked in portrait for phone format, and I want the user beeing able to use both portrait and landscape on a tablet format.
I've tried with screen size by using :
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
but it doesn't seem to work when I want to lock screen from code. Any idea of a good way to do this?