From 6436a92515f53ce18aba64914fadaa32d6933ea8 Mon Sep 17 00:00:00 2001 From: Diego Barreiro Perez Date: Sun, 14 Jan 2024 22:44:20 +0000 Subject: [PATCH] Use Version Codes constants --- .../google/appinventor/components/runtime/LinearProgress.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appinventor/components/src/com/google/appinventor/components/runtime/LinearProgress.java b/appinventor/components/src/com/google/appinventor/components/runtime/LinearProgress.java index 8608c6fb03f..4505e304777 100644 --- a/appinventor/components/src/com/google/appinventor/components/runtime/LinearProgress.java +++ b/appinventor/components/src/com/google/appinventor/components/runtime/LinearProgress.java @@ -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 { @@ -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")