Created
January 23, 2012 19:15
-
-
Save erichegt/1664963 to your computer and use it in GitHub Desktop.
Verificando orientação em tablet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestActivity extends Activity { | |
//... | |
public private boolean estaNaHorizontal() { | |
return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE | |
&& getResources().getConfiguration().isLayoutSizeAtLeast( | |
Configuration.SCREENLAYOUT_SIZE_XLARGE); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment