简体   繁体   English

为不同的Android设备设计全屏图形

[英]Designing full screen graphics for different Android devices

I am a experienced iOS developer but I am totally new to Android. 我是一位经验丰富的iOS开发人员,但对Android完全陌生。 I have to develop a Android app with a full screen background image and various images that has to fit the screen quite well. 我必须开发一个具有全屏背景图像和各种图像的Android应用程序,这些图像必须非常适合屏幕。 Now on iOS we live in a "protected" world where this is easy as I know the screen size of every device, but on Android that is very different I think. 现在,在iOS上,我们生活在一个“受保护”的世界中,据我所知,每台设备的屏幕尺寸都很简单,但是在Android上,我认为这是非常不同的。 I have read about the small/normal/large/xlarge and ldpi/mdpi/hdpi/xhdpi structure, but I cant find anything on designing a full screen image that works well across devices with different sizes and ratios. 我已经阅读了有关小/普通/大/超大和ldpi / mdpi / hdpi / xhdpi结构的信息,但是在设计可在具有不同尺寸和比率的设备上正常使用的全屏图像时,我找不到任何东西。 How would I go and do that? 我将如何去做? I mean, what image size should I make for eg a normal+hdpi device to make it look good? 我的意思是,我应该为普通+ hdpi设备制作什么样的图像尺寸以使其看起来不错? The images must not be distorted (so the ratio must not be changed) but I can live with them being shrinked in size. 图像不能失真(因此不能更改比例),但是我可以忍受图像尺寸的缩小。 Should I add some "space" to the image in top/bottom or sides to make it work well? 我应该在图像的顶部/底部或侧面添加一些“空间”以使其正常工作吗? How is this done best? 如何做到最好?

Thank you 谢谢
Søren 索伦

I do all the scaling myself. 我自己做所有的缩放。 Use as little xml as possible and set all the sizes within your app once you have the screen dimensions that you were given by android. 一旦有了android给出的屏幕尺寸,就使用尽可能少的xml并在应用程序中设置所有尺寸。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM