himelbrand / react-native-numeric-input

a stylish numeric input for react native
MIT License
150 stars 98 forks source link

[BUG] - Icons not showing on Android 9 #52

Open richardfelkl opened 4 years ago

richardfelkl commented 4 years ago

Describe the bug Icons for +/- are not showing for Android 9. Tested on emulator only. In iOS this problem doesn't happen.

To Reproduce Steps to reproduce the behavior:

  1. Import the package
  2. use the <NumericInput onChange={value => console.log(value)} />
  3. Android simulator is showing this: Screenshot_1574761278

Expected behavior It should display icons properly.

Enviorment (please complete the following information):

rajisundaram-s commented 4 years ago

same issue

brunomiquelotto commented 4 years ago

Someone solved this?

takeruadelbert commented 3 years ago

you need to install react native vector icons.

behnamben commented 3 years ago

you need to install react native vector icons.

I did. But the issue still persists. in my case, the plus icon is working but the minus is not. I tried to change them but when I enter any other icon names, it shows me some random icon. I think the issue is for build target SDK API 29 or more. I tested the app on Android 8.1 device.

amitbravo commented 3 years ago

I had installed vector icons already but I was not able to show icons properly , however, I saw I was using only fontawesome and materialcommunity icons , I added more into app/build.gradle file as iconFontNames: [ 'Octicons.ttf','Ionicons.ttf','Feather.ttf','MaterialCommunityIcons.ttf','FontAwesome.ttf','MaterialIcons.ttf', 'EvilIcons.ttf', 'SimpleLineIcons.ttf' ] // Name of the font files you want to copy

and its working fine now

sparcbr commented 3 years ago

Should close this issue.

behnamben commented 3 years ago

Should close this issue.

Is it solved?

Pil0tJones commented 3 years ago

I'm also experiencing the same issue

lb90 commented 3 years ago

Uses Ionicons internally, so just specify Ionicons.ttf in android/app/build.gradle

Pil0tJones commented 3 years ago

Uses Ionicons internally, so just specify Ionicons.ttf in android/app/build.gradle

@lb90 I tried doing so by doing this in android/app/build.gradle:

project.ext.vectoricons = [
    iconFontNames: [ 'IonIcons.ttf'] 
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

However, the icons are still not showing up, what am I missing?

lb90 commented 3 years ago

Dunno if it really matters, but try Ionicons.ttf (only the first I uppercase)

lb90 commented 3 years ago

And as a last resort, if nothing works, try resetting the Metro bundler cache:

npx react-native start --reset-cache

See https://reactnavigation.org/docs/6.x/troubleshooting/#stale-cache-of-metro-bundler

NitinPandey321 commented 1 year ago

I had installed vector icons already but I was not able to show icons properly , however, I saw I was using only fontawesome and materialcommunity icons , I added more into app/build.gradle file as iconFontNames: [ 'Octicons.ttf','Ionicons.ttf','Feather.ttf','MaterialCommunityIcons.ttf','FontAwesome.ttf','MaterialIcons.ttf', 'EvilIcons.ttf', 'SimpleLineIcons.ttf' ] // Name of the font files you want to copy

and its working fine now

Thanks It's also working for me.

Tazmeenilsa commented 8 months ago

Warning: Failed prop type: Invalid prop name of value md-add supplied to Icon, expected one of ["accessibility","accessibility-outline","accessibility-sharp","add","add-circle","add-circle-outline","add-circle-sharp

I'm getting this error .. In this package icon name has been given wrong.. In ionicons, plus icon name is add-outline, In this package it is md-add... how to solve it?