diff --git a/docs/android-styling.md b/docs/android-styling.md
index 974c69f1..9dd83bae 100644
--- a/docs/android-styling.md
+++ b/docs/android-styling.md
@@ -69,5 +69,6 @@ The following illustrations show the different styles that can be applied to the
| background | android:background |
| headerBackground | android:headerBackground |
| numbersBackgroundColor | android:numbersBackgroundColor |
+| numbersInnerTextColor | android:numbersInnerTextColor |
| numbersSelectorColor | android:numbersSelectorColor |
| numbersTextColor | android:numbersTextColor |
diff --git a/plugin/src/__tests__/withDateTimePickerStyles.test.js b/plugin/src/__tests__/withDateTimePickerStyles.test.js
new file mode 100644
index 00000000..5a4e5d1c
--- /dev/null
+++ b/plugin/src/__tests__/withDateTimePickerStyles.test.js
@@ -0,0 +1,81 @@
+import {promises as fs} from 'fs';
+import path from 'path';
+import {compileModsAsync} from '@expo/config-plugins';
+
+import withDateTimePickerStyles from '../withDateTimePickerStyles';
+
+const temporaryProjectRoots = [];
+
+afterEach(async () => {
+ await Promise.all(
+ temporaryProjectRoots
+ .splice(0)
+ .map((projectRoot) => fs.rm(projectRoot, {recursive: true, force: true})),
+ );
+});
+
+const runAndroidPrebuild = async (timePicker) => {
+ const projectRoot = await fs.mkdtemp(
+ path.join(__dirname, 'android-prebuild-'),
+ );
+ temporaryProjectRoots.push(projectRoot);
+
+ const valuesPath = path.join(projectRoot, 'android/app/src/main/res/values');
+ const valuesNightPath = path.join(
+ projectRoot,
+ 'android/app/src/main/res/values-night',
+ );
+
+ await Promise.all([
+ fs.mkdir(valuesPath, {recursive: true}),
+ fs.mkdir(valuesNightPath, {recursive: true}),
+ ]);
+ await Promise.all([
+ fs.writeFile(
+ path.join(valuesPath, 'styles.xml'),
+ '',
+ ),
+ fs.writeFile(path.join(valuesPath, 'colors.xml'), ''),
+ fs.writeFile(path.join(valuesNightPath, 'colors.xml'), ''),
+ ]);
+
+ const config = withDateTimePickerStyles(
+ {name: 'datetimepicker-plugin-test', slug: 'datetimepicker-plugin-test'},
+ {android: {timePicker}},
+ );
+
+ await compileModsAsync(config, {projectRoot, platforms: ['android']});
+
+ return {
+ colors: await fs.readFile(path.join(valuesPath, 'colors.xml'), 'utf8'),
+ colorsNight: await fs.readFile(
+ path.join(valuesNightPath, 'colors.xml'),
+ 'utf8',
+ ),
+ styles: await fs.readFile(path.join(valuesPath, 'styles.xml'), 'utf8'),
+ };
+};
+
+describe('withDateTimePickerStyles Android prebuild', () => {
+ it('writes the inner time picker text colors and style attribute', async () => {
+ const {colors, colorsNight, styles} = await runAndroidPrebuild({
+ numbersInnerTextColor: {light: '#123456', dark: '#abcdef'},
+ });
+
+ expect(styles).toContain(
+ '- @color/timePicker_numbersInnerTextColor
',
+ );
+ expect(colors).toContain(
+ '#123456',
+ );
+ expect(colorsNight).toContain(
+ '#abcdef',
+ );
+ });
+
+ it('still rejects an unknown time picker attribute', async () => {
+ await expect(
+ runAndroidPrebuild({unknownTextColor: {light: '#123456'}}),
+ ).rejects.toThrow('Invalid attribute name: unknownTextColor');
+ });
+});
diff --git a/plugin/src/withDateTimePickerStyles.ts b/plugin/src/withDateTimePickerStyles.ts
index cee54cba..37e4bcc1 100644
--- a/plugin/src/withDateTimePickerStyles.ts
+++ b/plugin/src/withDateTimePickerStyles.ts
@@ -59,6 +59,9 @@ const TIME_PICKER_ALLOWED_ATTRIBUTES = {
numbersBackgroundColor: {
attrName: 'android:numbersBackgroundColor',
},
+ numbersInnerTextColor: {
+ attrName: 'android:numbersInnerTextColor',
+ },
numbersSelectorColor: {
attrName: 'android:numbersSelectorColor',
},