Skip to content

fix(android): support numbersInnerTextColor in config plugin - #1052

Open
giaBaoJS wants to merge 1 commit into
react-native-datetimepicker:masterfrom
giaBaoJS:codex/fix-time-picker-inner-text-color
Open

fix(android): support numbersInnerTextColor in config plugin#1052
giaBaoJS wants to merge 1 commit into
react-native-datetimepicker:masterfrom
giaBaoJS:codex/fix-time-picker-inner-text-color

Conversation

@giaBaoJS

@giaBaoJS giaBaoJS commented Aug 18, 2026

Copy link
Copy Markdown

Summary

Fixes #1029.

  • Allow the Android time picker config plugin to map numbersInnerTextColor to the framework's android:numbersInnerTextColor attribute.
  • Document the new time picker styling property.
  • Add a regression test that runs the plugin through Expo's prebuild mod compiler and verifies the generated styles.xml, light colors.xml, and dark colors.xml output.

Test Plan

What's required for testing (prerequisites)?

  • Install dependencies with yarn install --immutable.

What are the steps to reproduce (after prerequisites)?

  • yarn test plugin/src/__tests__/withDateTimePickerStyles.test.js --runInBand — 2 tests passed.
  • yarn test --runInBand — 24 tests passed across 4 suites.
  • yarn lint — passed with 0 errors (22 existing warnings).
  • yarn eslint plugin/src/__tests__/withDateTimePickerStyles.test.js — passed.
  • yarn plugin:build — passed.
  • yarn prettier --check plugin/src/withDateTimePickerStyles.ts plugin/src/__tests__/withDateTimePickerStyles.test.js docs/android-styling.md — passed.
  • yarn pack --dry-run — passed.

Regression evidence:

  • Before the whitelist change, the prebuild regression failed in android.styles with Invalid attribute name: numbersInnerTextColor.
  • Temporarily removing the final whitelist entry reproduced the same failure, while the unknown-key test continued to pass.
  • A deliberately incorrect light-color assertion failed against the generated colors.xml value, confirming the XML assertions are active.
  • The final test verifies an unrelated unknown key is still rejected.

yarn flow cannot execute on this ARM64 macOS host because the installed macOS Flow binary is x86_64. Running the Linux ARM64 binary in a container also exposes the existing .flowconfig/dependency version mismatch (^0.217.0 vs 0.278.0) and existing Flow errors. The plugin TypeScript build passes.

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)
  • I have added automated tests, either in JS or e2e tests, as applicable

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.

Android TimePickerDialog: Impossible to style text color (no available attributes in plugin)

1 participant