Created
September 11, 2017 09:43
-
-
Save hector6872/7f8ba91500b86bad987a1f70e91c7b05 to your computer and use it in GitHub Desktop.
SupportVersion
This file contains hidden or 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 SupportVersion { | |
private SupportVersion() { | |
} | |
public static boolean isLollipopOrAbove() { | |
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; | |
} | |
public static boolean isMarshmallowOrAbove() { | |
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; | |
} | |
public static boolean isOreoOrAbove() { | |
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on https://github.com/Aracem/supportversion/blob/master/com/aracem/utils/version/SupportVersion.java