-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not showing selected value on Android #414
Comments
Same error to :/ |
same error too |
1 similar comment
same error too |
As a temporary workaround, I found two solutions. Set one of the following prop to RNPickerSelect,
|
verified, inputAndroid: {color:'black' } this trick is easy to use,thx bro |
@iwashi1t Thanks. It helps. But as you mentioned, it is just temporary workaround, it will be great, if somebody from team take a look on it. |
After many hours of twiddling with this thing finally found this thread. Low and behold this indeed does fix the problem!! My other solution was to set the placeholder as empty object, but this screws up the layout if you're needing that placeholder |
This didn't fix the issue. |
style={{ inputAndroid: { color: 'black' } }} these two perfectly works for me |
I'm having this issue with iOS actually. Tried setting styles for const pickerStyles = StyleSheet.create({
inputIOS: {
fontSize: 16,
paddingVertical: 12,
paddingHorizontal: 10,
borderWidth: 1,
borderColor: 'gray',
borderRadius: 4,
color: 'black',
paddingRight: 30 // to ensure the text is never behind the icon
},
inputAndroid: {
fontSize: 16,
paddingHorizontal: 10,
paddingVertical: 8,
borderWidth: 0.5,
borderColor: 'purple',
borderRadius: 8,
color: 'black',
paddingRight: 30 // to ensure the text is never behind the icon
}
}) <PickerSelect
disabled={isSaving}
Icon={Chevron}
style={pickerStyles}
placeholder={{}}
items={items}
value={value}
onValueChange={(value) => setValue(value)}
useNativeAndroidPickerStyle={false}
textInputProps={{ style: { borderRadius: 5 } }}
/> |
u said useNativeAndroidPickerStyle={false}, find another for iso |
const [selectedLanguage, setSelectedLanguage] = useState(''); <RNPickerSelect |
hey, lets try.. |
One thing that I found was that if you have a default Android Theme, it usually has a default application-wide font color set to android/app/src/main/res/values/styles.xml <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
<item name="android:statusBarColor">@color/black</item>
</style> android/app/src/main/AndroidManifest.xml <application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"> References:
It seems that there are some native parts of this package that can be changed by tweaking details of the manifest. |
Which version of picker_select you are using ? |
Regarding iOS and Android I encounter similar issue when padding (in inputIOS or )inputAndroid was set to large number, like 20 on ios 14 or lower. on ios 15 vertical padding of 20+ didn't cause same issue. |
Describe the bug
I am using picker-select in form for creating/editing notes. I am fetching
items
from our API.First issue is with create note:
Issue with edit:
It works fine only if i have
items
array locally ( not acceptable) and also default value is set to value fromitems
, which is problem for creating new, because default is null. Also it is not accepting default value fromprops
(as can be seen in code snipet)On iPhone works just fine, only Android issue.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the same behavior as on iPhone.
Screenshots
Additional details
Reproduction and/or code sample
The text was updated successfully, but these errors were encountered: