简体   繁体   English

Android启动画面为图像

[英]Android splash screens as images

I want to make image as a splash screen. 我想将图像制作为初始屏幕。 What sizes should I make to make splash screen image fill whole screen without stretching supporting horizontal and vertical orientations and all densities. 在不拉伸以支持水平和垂直方向以及所有密度的情况下,应使初始屏幕图像填充整个屏幕应具有什么尺寸。 Also where should I write code to indicate which images are splash screens for each size and orientation? 另外,我应该在哪里编写代码来指示每种尺寸和方向的初始屏幕图像?

iOS has that kind of feature to select launch images in the properties to set all required image sizes to support all screens and all orientations,without writing any lines of code iOS具有这种功能,可以在属性中选择启动图像以设置所有必需的图像大小以支持所有屏幕和所有方向,而无需编写任何代码 在此处输入图片说明

You need to use 9-patch. 您需要使用9-patch。 9-patch images can stretch in 4 directions if you want. 如果需要,9色块图像可以沿4个方向拉伸。 It will solve your problem. 它将解决您的问题。 Xamarin can also use 9-patch images as splash screen. Xamarin还可以使用9色块图像作为初始屏幕。

Example Documentation 示例文档

您可以使用可能对iOS和Android都有用的矢量资产图像作为参考: https : //developer.android.com/studio/write/vector-asset-studio.html

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

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