I have created an empty Nativescript application with tns create myApp'. However,app/App_Resources/Android/drawable-hdpi` and other directories does not contain any default system icons. Thus, I cannot use them in the application. How can I find or install default system icons?
2 Answers
However, the default system icons are called using something like this:
<ActionItem ios:systemIcon="12" android:systemIcon="ic_menu_search" tap="showSearch" ios:position="right" android:position="actionBar" />
You can find a list (unfortunately without images) at https://developer.android.com/reference/android/R.drawable.html
1 Comment
ios.systemIcon? And it seems the android ones are the ic_ prefixed ones here - developer.android.com/reference/android/R.drawable.html - but when i use them they are always transparent in the middle, and just border, any way to get them solid colored?For using your custom icons in the application, you have to add them in each drawable-XXX folder and then in your XML src="res://my_icon"
You can find more informations in the official documentation of NS : https://docs.nativescript.org/ui/ui-images#load-images-from-resource
1 Comment
ios.systemIcon?