开发者

Android: anyone know the filename for the "settings" icon?

I am looking for the gear shaped settings icon but can't find it in the sdk drawables. Does anyone know the filenam开发者_JS百科e?

Thank you


I believe that ic_menu_preferences.png is what you're looking for. It's in the drawables-?dpi directories, not in drawables.


This is a handy page I found for the built in icons:

http://since2006.com/android/2.1-drawables.php


ic_setting_dark as described in Honest Objections's answer seems to be gone (or deprecated). At least I was not able to find it in API 24. However, the method and the containing link are still valid, i.e.:

"@android:drawable/<drawable>" where <drawable> is one of the ids listed here, e.g. ic_menu_preferences (which, unfortunately, is not a gear but a wrench ...)


In the meantime, google released a huge set of material icons at material.io which can be directly used in Android Studio to create svg or png assets as described here. tl;dr:

In the Android view of the Project window, right-click the res folder and select New > Vector Asset.


Just for anyone visiting this in the future, it can be found directly under drawable if you have the SDK, along with many others:

android:src="@drawable/ic_setting_dark"


You can find the nice cog icon in Android Asset Studio by searching for the settings icon.

You can open Android Asset Studio by right-clicking res: drawable and selecting New: Image Asset.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜