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
The icon: res://ic_add_white was not found. Check your XML icon property #76
Comments
Same here... |
That is only a reference to the icon, you would have to create/download the icon and add it to your AppResources as per instructions here: https://docs.nativescript.org/ui/images#load-images-from-a-resource |
I've added font-awesome icons, trying to use them for the FAB <Fab
(tap)="fabTap()"
row="1"
[icon]="plusIcon"
rippleColor="#f1f1f1"
class="fab-button font-awesome">
</Fab> plusIcon = String.fromCharCode(0xf067); This is working for me on ios, but on Android, I get the error
|
As noted already, the error comes from the icon not being in the app_resources of the project. I'd rather not bundle the icon since it's just adding extra files to someone's project and they may not use the @CoreyCole - font/text is not supported for the icon. The android native widget extends the Android ImageView widget (going from memory right now so could be a bit off), so adding support for text isn't plug n' play 😄 - if you'd rather use font icons then I'd suggest mocking a FAB with a button and using the NS css to style it height/width and border-radius for a circle 👍 |
If someone would like to add some notes to the README about that and update the README & demo to use |
Yeah idk the documentation @darkmantle linked is kinda complicated for an mvp if you don't care too much about image sizes. I was able to get it to work by downloading an image to my <Fab (tap)="fabTap()" row="1" [icon]="'~/images/ic_add_white.png'" class="fab-button"></Fab> |
@bradmartin I've opened a PR #79 explaining how to do this simply. Maybe we could also add a line explaining why users might want to pursue the |
I know its closed, but just want to point out that even after commenting the solution myself, I've then forgotten how to fix this error, and found my own solution while Googling Fail ¬_¬ |
So.. I think the
ic_add_white
bundle could be created for the plugin.Project environments
dependencies:
v8.11.2
nativescript-angular
:~5.2.0
nativescript-floatingactionbutton
:^4.1.3
nativescript-theme-core
:~1.0.4
reflect-metadata
:~0.1.8
rxjs
:~5.5.2
tns-core-modules
:^4.1.0
devDependencies:
nativescript
:^4.1.0
nativescript-dev-typescript
:~0.6.0
tslint
:^5.9.1
typescript
:~2.6.2
The text was updated successfully, but these errors were encountered: