android - Android launch_background 适合图像的宽度
问题描述
我正在尝试将启动屏幕图像添加到我的应用程序。
这是我的launch_background.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/black" />
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="center"
android:scaleType="fitCenter"
android:src="@drawable/myAppIcon" />
</item>
</layer-list>
现在图像太大了,只适合设备的高度。它需要适合宽度,因此它不会延伸到屏幕之外。
我试着添加这个:
android:scaleType="fitCenter"
如何缩放图像使其适合屏幕宽度?
提前致谢!
解决方案
推荐阅读
- angular - SVG - 线性渐变 - 停止偏移/停止颜色属性 Angular
- logstash-grok - Grok 模式语义
- assembly - 使用 = 运算符或从文字池加载数据有什么区别?
- html - 并排显示 DIV
- shopify - Shopify:如何克隆商店以设置开发环境
- list - 从一个列表复制格式并将其应用于其他列表?
- python - DDNS 上的 Python 套接字
- java - 一台应用程序服务器 (Wildfly) 中的许多应用程序指向 Microsoft Application Insights 中的多个检测键
- python - 仅带有文件名的 Grep 摘要
- node.js - 如果在 writeFileSync 操作期间中止 Node 脚本,文件会发生什么情况?