'React Native selectionColor is not changing the Cursor Color
I need to change the cursor color of the react-native TextInput. I am using the selectionColor props and setting the color but it is not changing the cursor color of the TextInput. I have found a workaround for and added the following code to my android/app/src/main/res/values/styles.xml file
<item name="colorControlActivated">@android:color/black</item>
This works but its sets the global color for all the screens and this does not work for my screens with a black background. Here is how I am using the text input.
<TextInput
selectionColor={'black'}
placeholderTextColor="gray"
textBreakStrategy="highQuality"
placeholder="12"
style={styles.input__style}
keyboardType="number-pad" />
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
