Skip to content

Commit

Permalink
Use Version Codes constants
Browse files Browse the repository at this point in the history
  • Loading branch information
barreeeiroo committed Feb 11, 2024
1 parent 7d9b88c commit 2dae2cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void HeightPercent(int height) {
@SimpleProperty(description = "Set the lower range of the progress bar to min. "
+ "This function works only for devices with API >= 26")
public void Minimum(int value) {
if (VERSION.SDK_INT >= 26) {
if (VERSION.SDK_INT >= Build.VERSION_CODES.O) {
progressBar.setMin(value);
Log.i(LOG_TAG, "setMin = " + value);
} else {
Expand All @@ -86,7 +86,7 @@ public void Minimum(int value) {

@SimpleProperty
public int Minimum() {
return VERSION.SDK_INT >= 26 ? progressBar.getMin() : 0;
return VERSION.SDK_INT >= Build.VERSION_CODES.O ? progressBar.getMin() : 0;
}

@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_INTEGER, defaultValue = "100")
Expand Down

0 comments on commit 2dae2cf

Please sign in to comment.