If I have created an Android app and I use a emulator. I would to know If I use horizontal or vertical screen by using java code.
Is there a syntax that gives a feedback if current situation if horcontal or vertical screen?
Thank you!
If I have created an Android app and I use a emulator. I would to know If I use horizontal or vertical screen by using java code.
Is there a syntax that gives a feedback if current situation if horcontal or vertical screen?
Thank you!
You may obtain current orientation from resources
context.getResources().getConfiguration().orientation
Note that there are 4 posiible values: landscape, portrait, undefined and square (deprecated since API level 16)