Im using OrientationEventListener to detect the orientation, but I have a problem in that the tablets are landscape and phones are portrait by default. This means that OrientationEventListener returns a value of 90 for portrait on tablets, but 0 for portrait on mobiles.
The activity I am using has the camera so I cannot change between orientations, thus I use the value of Orientation to reposition a couple of elements on the screen as needed.
Is it possible to detect if the device is a tablet, so that I can adjust the value accordingly. i.e. How do I work out the value of isTablet?
if(isTablet)
{
orientation += -90;
if(orientation < 0) //Check if we have gone too far back, keep the result between 0-360
{
orientation += 360;
}
}