Skip to content

Commit 228587e

Browse files
authored
fix(android): improve spinner buttons contrast (#674)
* fix(android): increase spinner buttons contrast * docs: readme updates
1 parent a0cde00 commit 228587e

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,14 @@ React Native date & time picker component for iOS, Android and Windows.
9292
## Requirements
9393

9494
- Only Android API level >=21 (Android 5), iOS >= 11 are supported.
95-
- Tested with Xcode 13.0 and RN 0.66.3. Other configurations are very likely to work as well but have not been tested.
95+
- Tested with Xcode 14.0 and RN 0.70. Other configurations are very likely to work as well but have not been tested.
9696

9797
## Expo users notice
9898

99-
This module is part of Expo - [see docs](https://docs.expo.io/versions/latest/sdk/date-time-picker/). However, Expo SDK may not contain the latest version of the module and therefore, the newest features and bugfixes may not be available in Expo. Use the command `expo install @react-native-community/datetimepicker` (not `yarn` or `npm`) to install this module - Expo will automatically install the latest version compatible with your Expo SDK (which may _not_ be the latest version of the module available).
99+
This module is part of Expo Managed Workflow - [see docs](https://docs.expo.io/versions/latest/sdk/date-time-picker/). However, Expo SDK in the Managed Workflow may not contain the latest version of the module and therefore, the newest features and bugfixes may not be available in Expo Managed Workflow.
100+
If you use the Managed Workflow, use the command `expo install @react-native-community/datetimepicker` (not `yarn` or `npm`) to install this module - Expo will automatically install the latest version compatible with your Expo SDK (which may _not_ be the latest version of the module available).
101+
102+
If you're using the [`expo prebuild`](https://docs.expo.dev/workflow/prebuild/) command and building your native app projects (e.g. with EAS Build or locally), you can use the latest version of the module.
100103

101104
## Getting started
102105

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources xmlns:tools="http://schemas.android.com/tools">
2+
<style name="SpinnerDatePickerDialog" parent="SpinnerDatePickerDialogBase">
3+
<item name="colorPrimary">@android:color/white</item>
4+
</style>
5+
6+
<style name="SpinnerTimePickerDialog" parent="SpinnerTimePickerDialogBase">
7+
<item name="colorPrimary">@android:color/white</item>
8+
</style>
9+
</resources>

android/src/main/res/values/styles.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
2-
<style name="SpinnerDatePickerDialog" tools:targetApi="lollipop">
2+
<style name="SpinnerDatePickerDialogBase" tools:targetApi="lollipop">
33
<item name="android:datePickerStyle">@style/SpinnerDatePickerStyle</item>
44
<item name="android:windowIsFloating">true</item>
55
</style>
6+
<style name="SpinnerDatePickerDialog" parent="SpinnerDatePickerDialogBase" />
67

78
<style name="SpinnerDatePickerStyle" parent="android:Widget.Material.DatePicker" tools:targetApi="lollipop">
89
<item name="android:datePickerMode">spinner</item>
@@ -25,10 +26,11 @@
2526
<item name="android:timePickerMode">clock</item>
2627
</style>
2728

28-
<style name="SpinnerTimePickerDialog" tools:targetApi="lollipop">
29+
<style name="SpinnerTimePickerDialogBase" tools:targetApi="lollipop">
2930
<item name="android:timePickerStyle">@style/SpinnerTimePickerStyle</item>
3031
<item name="android:windowIsFloating">true</item>
3132
</style>
33+
<style name="SpinnerTimePickerDialog" parent="SpinnerTimePickerDialogBase" />
3234

3335
<style name="SpinnerTimePickerStyle" parent="android:Widget.Material.TimePicker" tools:targetApi="lollipop">
3436
<item name="android:timePickerMode">spinner</item>

0 commit comments

Comments
 (0)