From d2e90b8b7065b59171ca24edf97ba9941cfcaa8f Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Tue, 23 Mar 2021 14:47:10 +0100 Subject: [PATCH] fix: Revert "fix: android spinner not working with latest build sdk (#418)" (#419) This reverts commit bd79efee90b9fa6cdfd81f013a1982e9273cec81. --- .../rndatetimepicker/RNDismissableDatePickerDialog.java | 2 +- .../rndatetimepicker/RNDismissableTimePickerDialog.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java index ea259d7b..43f2278d 100644 --- a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java +++ b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableDatePickerDialog.java @@ -65,7 +65,7 @@ protected void onStop() { } private void fixSpinner(Context context, int year, int month, int dayOfMonth, RNDatePickerDisplay display) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && display == RNDatePickerDisplay.SPINNER) { + if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N && display == RNDatePickerDisplay.SPINNER) { try { // Get the theme's android:datePickerMode Class styleableClass = Class.forName("com.android.internal.R$styleable"); diff --git a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java index 45f6df7d..073bd8d1 100644 --- a/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java +++ b/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDismissableTimePickerDialog.java @@ -71,7 +71,7 @@ protected void onStop() { } private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24HourView, RNTimePickerDisplay display) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && display == RNTimePickerDisplay.SPINNER) { + if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N && display == RNTimePickerDisplay.SPINNER) { try { Class styleableClass = Class.forName("com.android.internal.R$styleable"); Field timePickerStyleableField = styleableClass.getField("TimePicker");