I got an app for Android and IOS with React Native that requires the picker to align text to the right.
I tried with fontAlign, but errors that is not a valid property, I tried with textAlign, but warns that is not a valid property.
style.inputAndroid and/or style.inputIOS and textAlign: right works
android must be in useNativeAndroidPickerStyle={false}
not sure if you can modify text alignment on a native android picker element - you'll have to google that. if you can, you can apply props via pickerProps
thanks @lfkwtz that worked, but for some reason in Android a underline appeared, but setting the style for underline to opacity 0 or passing the pickerProps underlineColorAndroid = 'transparent' doesn't work, any clues?
Hey @lfkwtz I just figured out that the underline that appears if because the React Native default text input underline for android. Usually goes away with:
underlineColorAndroid={"transparent"}
as a property of textInput, I was trying to pass this through the textInputProps, but for some reason is cleared before reach the component. I ran a local copy of the component and adding the previously mentioned field makes the underline go away. Is there any chance to implement this on the component?
Most helpful comment
style.inputAndroidand/orstyle.inputIOSandtextAlign: rightworksandroid must be in
useNativeAndroidPickerStyle={false}not sure if you can modify text alignment on a native android picker element - you'll have to google that. if you can, you can apply props via
pickerProps