Last active
June 13, 2016 11:35
-
-
Save aldakur/6deffa3108cec80980cb8b80de478b2d to your computer and use it in GitHub Desktop.
Check android version in a condition
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
// Check the condition as | |
if (android.os.Build.VERSION.SDK_INT>=11){ | |
//Do something | |
} | |
// This is better | |
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){ | |
//Do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment