[英]What kind of images should i use for my android app
i am developing an android app and i want an image as a wallpaper and some other images. 我正在开发一个android应用程序,我想要一个图像作为墙纸和一些其他图像。 Should i create these images myself or there are some android libraries where i can download images for my app which i want to publish it in Google play.
我应该自己创建这些图像,还是有一些Android库可以在其中下载要在Google Play中发布的应用程序图像。
I think it depends on what you're after. 我认为这取决于您的追求。 If you want a static background or other images, then use a
.png
with different densities (ie hdpi, mdpi, xhdpi, xxhdpi) more about densities: http://developer.android.com/guide/practices/screens_support.html 如果您想要静态背景或其他图像,请使用具有不同密度(即hdpi,mdpi,xhdpi,xxhdpi)的
.png
进一步了解密度: http : //developer.android.com/guide/practices/screens_support.html
If you want to use images for buttons, or other widgets you should look into 9patches, using 9patches means you can completely resize the image in your app without any scaling problems, more about 9patches: http://developer.android.com/tools/help/draw9patch.html 如果要将图像用于按钮或其他窗口小部件,则应查看9patches,使用9patches意味着您可以完全调整应用中图像的大小,而不会出现任何缩放问题,有关9patches的更多信息: http : //developer.android.com/tools /help/draw9patch.html
But, if you have an image which is likely to change, ie a users profile picture you should probably look at loading it from a URL into an ImageView
something like Picasso by square: http://square.github.io/picasso/ 但是,如果您有可能更改的图像,即用户个人资料图片,则可能应该考虑将它从URL加载到
ImageView
东西,例如Picasso by square: http : //square.github.io/picasso/
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.