【问题标题】:NativeScript system iconsNativeScript 系统图标
【发布时间】:2016-07-16 08:21:31
【问题描述】:

在哪里可以找到nativescript 的系统图标?

例如:

<ActionBar title="ActionBar Style">
    <NavigationButton text="Go Back" android.systemIcon="ic_menu_back"></NavigationButton>
    <ActionItem ios.systemIcon="2" android.systemIcon="ic_menu_edit" ios.position="right"></ActionItem>
</ActionBar>

我在哪里可以找到 ic_menu_back, ic_menu_edit 图标?

【问题讨论】:

  • 如果它解决了你的问题,你能接受吗? :)

标签: nativescript


【解决方案1】:

【讨论】:

  • 如果不在应用程序中使用并编译然后查看这些图标,我们如何知道其中任何一个图标的外观?
【解决方案2】:

它们还包含在您可能已经安装的 Android Studio 中。我破解了这个 .bat 文件,将一个图标复制到我在 Windows 上的应用程序文件夹中:

@echo on
set BAT_FILE=%~n0
set source="C:\Program Files\Android\Android Studio\plugins\android\lib\layoutlib\data\res"
set target=".\App_Resources\Android"
set f1=drawable-hdpi
set f2=drawable-ldpi
set f3=drawable-mdpi
set f4=drawable-nodpi
set f5=drawable-xhdpi
set f6=drawable-xxhdpi
set f7=drawable-xxxhdpi

set icon=ic_menu_back.png

if exist %source%\%f1%\%icon% copy %source%\%f1%\%icon% %target%\%f1%\ >%BAT_FILE%.txt 
if exist %source%\%f2%\%icon% copy %source%\%f2%\%icon% %target%\%f2%\ >>%BAT_FILE%.txt 
if exist %source%\%f3%\%icon% copy %source%\%f3%\%icon% %target%\%f3%\ >>%BAT_FILE%.txt 
if exist %source%\%f4%\%icon% copy %source%\%f4%\%icon% %target%\%f4%\ >>%BAT_FILE%.txt 
if exist %source%\%f5%\%icon% copy %source%\%f5%\%icon% %target%\%f5%\ >>%BAT_FILE%.txt 
if exist %source%\%f6%\%icon% copy %source%\%f6%\%icon% %target%\%f6%\ >>%BAT_FILE%.txt 
if exist %source%\%f7%\%icon% copy %source%\%f7%\%icon% %target%\%f7%\ >>%BAT_FILE%.txt 

type %BAT_FILE%.txt 
rem .
pause
erase %BAT_FILE%.txt 

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-10-07
    • 1970-01-01
    • 1970-01-01
    • 2011-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多