Skip to content

Commit

Permalink
Build.VERSION_CODES.Q to 29
Browse files Browse the repository at this point in the history
replace  Build.VERSION_CODES.Q to 29 to avoid error in lower build version.
  • Loading branch information
zheng17 committed Mar 1, 2020
1 parent bfa5998 commit 1367172
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public static String[] toStringArray(JSONArray array) {
public static boolean setNumberPickerTextColor(NumberPicker numberPicker, int color) {
float myTextSize = 10;
try{
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q){
if (android.os.Build.VERSION.SDK_INT >= 29){
// API >= 29
Method setColorMethod = numberPicker.getClass().getMethod("setTextColor", int.class);
setColorMethod.invoke(numberPicker, color);
Expand Down

0 comments on commit 1367172

Please sign in to comment.