Skip to content

Commit

Permalink
Version 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavpandey committed Jan 18, 2018
1 parent 5e4ad44 commit c09fe13
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ It can be installed by adding the following dependency to your `build.gradle` fi

```groovy
dependencies {
implementation 'com.pranavpandey.android:dynamic-utils:0.7.0'
implementation 'com.pranavpandey.android:dynamic-utils:0.8.0'
}
```

Expand Down
1 change: 1 addition & 0 deletions bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bintray {

gpg {
sign = true
passphrase = properties.getProperty("bintray.passphrase")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ext {
githubUrl = 'pranavpandey/dynamic-utils'

mavenGroup = 'com.pranavpandey.android'
mavenVersion = '0.7.0'
mavenVersion = '0.8.0'
mavenInceptionYear = 2017
mavenArtifactId = 'dynamic-utils'
bintrayRepo = 'android'
Expand All @@ -50,7 +50,7 @@ ext {
licenseDistribution = 'repo'
allLicenses = ["Apache-2.0"]

versionCode = 7
versionCode = 8

buildTools = '27.0.3'
minSdk = 14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ public static boolean isColorDark(@ColorInt int color) {
*
* @param color Color whose darkness to be calculated.
*
* @return Darkness of color (less that or equal to 1); 0 for white and 1 for black.
* @return Darkness of color (less that or equal to 1);
* 0 for white and 1 for black.
*/
public static double getColorDarkness(@ColorInt int color) {
return 1 - (0.299 * Color.red(color) + 0.587 * Color.green(color)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DynamicVersionUtils {
* To detect if the current Android version is Gingerbread or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#GINGERBREAD}.
* {@link Build.VERSION_CODES#GINGERBREAD}.
*
* @deprecated Minimum SDK is now {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
*/
Expand All @@ -42,7 +42,7 @@ public static boolean isGingerbread() {
* To detect if the current Android version is Gingerbread MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#GINGERBREAD_MR1}.
* {@link Build.VERSION_CODES#GINGERBREAD_MR1}.
*
* @deprecated Minimum SDK is now {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
*/
Expand All @@ -54,7 +54,7 @@ public static boolean isGingerbreadMR1() {
* To detect if the current Android version is Honeycomb or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#HONEYCOMB}.
* {@link Build.VERSION_CODES#HONEYCOMB}.
*
* @deprecated Minimum SDK is now {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
*/
Expand All @@ -66,7 +66,7 @@ public static boolean isHoneycomb() {
* To detect if the current Android version is Honeycomb MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#HONEYCOMB_MR1}.
* {@link Build.VERSION_CODES#HONEYCOMB_MR1}.
*
* @deprecated Minimum SDK is now {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
*/
Expand All @@ -78,7 +78,7 @@ public static boolean isHoneycombMR1() {
* To detect if the current Android version is Honeycomb MR2 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#HONEYCOMB_MR2}.
* {@link Build.VERSION_CODES#HONEYCOMB_MR2}.
*
* @deprecated Minimum SDK is now {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
*/
Expand All @@ -90,7 +90,7 @@ public static boolean isHoneycombMR2() {
* To detect if the current Android version is Ice Cream Sandwich or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
* {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
*/
public static boolean isIceCreamSandwich() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
Expand All @@ -100,7 +100,7 @@ public static boolean isIceCreamSandwich() {
* To detect if the current Android version is Ice Cream Sandwich MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1}.
* {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1}.
*/
public static boolean isIceCreamSandwichMR1() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1;
Expand All @@ -110,7 +110,7 @@ public static boolean isIceCreamSandwichMR1() {
* To detect if the current Android version is JellyBean or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#JELLY_BEAN}.
* {@link Build.VERSION_CODES#JELLY_BEAN}.
*/
public static boolean isJellyBean() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN;
Expand All @@ -120,7 +120,7 @@ public static boolean isJellyBean() {
* To detect if the current Android version is JellyBean MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#JELLY_BEAN_MR1}.
* {@link Build.VERSION_CODES#JELLY_BEAN_MR1}.
*/
public static boolean isJellyBeanMR1() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1;
Expand All @@ -130,7 +130,7 @@ public static boolean isJellyBeanMR1() {
* To detect if the current Android version is KitKat or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#KITKAT}.
* {@link Build.VERSION_CODES#KITKAT}.
*/
public static boolean isKitKat() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
Expand All @@ -140,7 +140,7 @@ public static boolean isKitKat() {
* To detect if the current Android version is Lollipop or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#LOLLIPOP}.
* {@link Build.VERSION_CODES#LOLLIPOP}.
*/
public static boolean isLollipop() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
Expand All @@ -150,7 +150,7 @@ public static boolean isLollipop() {
* To detect if the current Android version is Lollipop MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#LOLLIPOP_MR1}.
* {@link Build.VERSION_CODES#LOLLIPOP_MR1}.
*/
public static boolean isLollipopMR1() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1;
Expand All @@ -160,7 +160,7 @@ public static boolean isLollipopMR1() {
* To detect if the current Android version is M or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#M}.
* {@link Build.VERSION_CODES#M}.
*/
public static boolean isMarshmallow() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
Expand All @@ -170,7 +170,7 @@ public static boolean isMarshmallow() {
* To detect if the current Android version is N or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#N}.
* {@link Build.VERSION_CODES#N}.
*/
public static boolean isNougat() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
Expand All @@ -180,7 +180,7 @@ public static boolean isNougat() {
* To detect if the current Android version is N_MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#N_MR1}.
* {@link Build.VERSION_CODES#N_MR1}.
*/
public static boolean isNougatMR1() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1;
Expand All @@ -190,7 +190,7 @@ public static boolean isNougatMR1() {
* To detect if the current Android version is O or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#O}.
* {@link Build.VERSION_CODES#O}.
*/
public static boolean isOreo() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
Expand All @@ -200,7 +200,7 @@ public static boolean isOreo() {
* To detect if the current Android version is O_MR1 or above.
*
* @return {@code true} if current version is greater than or equal to
* {@link Build.VERSION_CODES#O_MR1}.
* {@link Build.VERSION_CODES#O_MR1}.
*/
public static boolean isOreoMR1() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ public static int getScreenOrientation(@NonNull Context context) {

/**
* @return The {@link WindowManager} overlay flag according to the
* android version.
* android version.
*
* @param alert {@code true} to return alert flag on below Android O
* devices.
* devices.
*
* @see WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY
* @see WindowManager.LayoutParams#TYPE_SYSTEM_OVERLAY
Expand Down

0 comments on commit c09fe13

Please sign in to comment.