Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Resolve Attribute issue causing Android Build to fail #853

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

lil-sahil
Copy link
Contributor

"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.

Previous:
theme.resolveAttribute(R.attr.dialogPreferredPadding, typedValue, true);

Updated:
theme.resolveAttribute(android.R.attr.dialogPreferredPadding, typedValue, true);

This fix ensures that the correct system attribute is referenced, preventing the build failure."

…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.
@@ -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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can verify this fix work! Thanks @lil-sahil

@henninghall
Copy link
Owner

@lil-sahil Thanks for your contribution! Do you know if there are still scenarios where this attribute won’t be found? (Considering if we need to add default values for the padding)

@henninghall henninghall changed the title Resolve Attribute issue causing Android Build to fail fix: Resolve Attribute issue causing Android Build to fail Aug 31, 2024
@henninghall henninghall merged commit 4c1e053 into henninghall:master Aug 31, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants