From 4076ccac8e420f7a98c113b9f4089b8c41ff2ed3 Mon Sep 17 00:00:00 2001 From: sahil nagpal Date: Fri, 30 Aug 2024 23:14:33 -0400 Subject: [PATCH] Fix resolveAttribute issue in DatePickerModuleImpl.java. Updated the line resolving the 'dialogPreferredPadding' attribute to include the 'android' prefix. This change corrects an error where the attribute could not be found, causing the build to fail on Android. --- .../java/com/henninghall/date_picker/DatePickerModuleImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/henninghall/date_picker/DatePickerModuleImpl.java b/android/src/main/java/com/henninghall/date_picker/DatePickerModuleImpl.java index fbca7f91..b8a2a800 100644 --- a/android/src/main/java/com/henninghall/date_picker/DatePickerModuleImpl.java +++ b/android/src/main/java/com/henninghall/date_picker/DatePickerModuleImpl.java @@ -171,7 +171,7 @@ public AlertDialogBuilder setColoredTitle(ReadableMap props){ coloredTitle.setText(title); TypedValue typedValue = new TypedValue(); Resources.Theme theme = DatePickerPackage.context.getCurrentActivity().getTheme(); - theme.resolveAttribute(R.attr.dialogPreferredPadding, typedValue, true); + theme.resolveAttribute(android.R.attr.dialogPreferredPadding, typedValue, true); int paddingInPixels = TypedValue.complexToDimensionPixelSize(typedValue.data, DatePickerPackage.context.getResources().getDisplayMetrics()); coloredTitle.setPadding(paddingInPixels, paddingInPixels, paddingInPixels, 0); coloredTitle.setTextSize(20F);