Standard Android menu icons, for example refresh [closed]

放肆的年华 提交于 2019-12-27 12:08:11

问题


The Android SDK offers the standard menu icons via android.R.drawable.X. However, some standard icons, such as ic_menu_refresh (the refresh icon), are missing from android.R.

Is there any way to get the original icons, maybe by extracting them from the applications? I already checked the Android source, but it's a bit too huge to look everywhere for the images.

I know the Android Drawables website, but I would like to get the correct hdpi, mdpi and ldpi version, preferable the original ones.


回答1:


Never mind, I found it in the source: base.git/core/res/res and subdirectories.

As others said in the comments, if you have the Android SDK installed it’s also on your computer. The path is [SDK]/platforms/android-[VERSION]/data/res.




回答2:


Bear in mind, this is a practice that Google explicitly advises not to do:

Warning: Because these resources can change between platform versions, you should not reference these icons using the Android platform resource IDs (i.e. menu icons under android.R.drawable).

Rather, you are adviced to make a local copy:

If you want to use any icons or other internal drawable resources, you should store a local copy of those icons or drawables in your application resources, then reference the local copy from your application code. In that way, you can maintain control over the appearance of your icons, even if the system's copy changes.




回答3:


Maybe a bit late. Completing the other answers, you have the hdpi refresh icon in:

"android_sdk"\platforms\"android_api_level"\data\res\drawable-hdpi\ic_menu_refresh.png




回答4:


After seeing this post I found a useful link:

http://developer.android.com/design/downloads/index.html

You can download a lot of sources editable with Fireworks, Illustrator, Photoshop, etc...
And there's also fonts and icon packs.

Here is a stencil example.




回答5:


You can get the icons from the android sdk they are in this folder

$android-sdk\platforms\android-xx\data\res



来源:https://stackoverflow.com/questions/2687027/standard-android-menu-icons-for-example-refresh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!