Open jacklj opened 2 years ago
You can find all the icons on Hotpot.
Then to select an Icon, just click it, this copies the icon name to your clipboard.
Here's an example to get the Safari (Browser) icon, for iOS only.
{ id: 'open', title: 'Open', image: Platform.select({ ios: 'safari', }), }
Hope this answers your question 😁
Thanks @kayode0x.
Sorry, I wasn’t clear enough - I know about using SF Symbols and Material Design icons.
The readme implies that you can alternatively use an “icon name that is included in the project” - or am I misreading it?
Thanks
it is not working for android the app is crashing when i use the name you mentioned
- For Android Icons, click the Material Design option.
- For iOS Icons, click the SF Symbols option.
Hi there, I'm experiencing the same issue as @hanishbasheer, my android icons are not working (they are working on iOS) It simply doesn't render any image even using the example code in the docs
Same issue on android React Native: 0.71.2 @react-native-menu/menu": "0.7.3"
Same for me, for android:
Using eg 'ic_menu_add' works and gives me a plus sign in a circle. But none of the names for android on Hotspot work in the code. And none of the icons for android on Hotspot seem to be named 'ic_menu_add'.
So it looks like the code is using a different set of icon names for android than Hotspot is.
Where do I find the list of icon names, and their images, that work in this code?
@willxy you need to add the icons via android studio In Android Studio, right-click on the “drawable” folder and select “New” » “Vector Asset”.
@willxy you need to add the icons via android studio In Android Studio, right-click on the “drawable” folder and select “New” » “Vector Asset”.
Thanks this helped.
@willxy you need to add the icons via android studio In Android Studio, right-click on the “drawable” folder and select “New” » “Vector Asset”.
This kinda worked for me but instead of using right-click on the "drawable" folder, I clicked on the "Resource Manager" tab on the left and then clicked the plus button and selected Vector Asset.
For those wondering, the default icons present for android can be found here (those that don't need an extra-install step): https://developer.android.com/reference/android/R.drawable
For instance: android: "ic_menu_gallery"
Hi, it says in the README:
Does it mean you add the icon to the native project, and then you can refer to it? How do you do this?
Thanks