Retrieve System Default Android Contact Picture

有些话、适合烂在心里 提交于 2019-12-20 01:36:17

问题


I know this may sound strange, but I want to retrieve the system default contact picture. You know, that icon that's used when there is no picture for the contact. It differs between different versions of Android, but it's generally a blank face, or a grey android, or whatever.

Can I get that image from the system and use it in my app?


回答1:


You can find them in the drawable folder of the resources that come with the emulator.

\android-sdk\platforms\android-v#\data\res\drawable\




回答2:


I dont think you can get the picture programmatically in app, because that image is private to Phone app of android.

If you want to copy the picture to your folder, it will be present at

/packages/apps/Phone/res/drawable-hdpi/picture_unknown.png

in AOSP code



来源:https://stackoverflow.com/questions/12224167/retrieve-system-default-android-contact-picture

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