gpt4 book ai didi

android - (Android) 如果我只将图像文件放在 drawable-xxhdpi 文件夹中,它是否适用于具有不同密度的所有设备

转载 作者:搜寻专家 更新时间:2023-11-01 07:45:39 25 4
gpt4 key购买 nike

我只有一张为 xxhdpi 密度制作的图像。如果我只将此文件放在 drawable-xxhdpi 文件夹中,它会在各种密度的所有设备上工作吗?像 ldpi, mdpi, xhdpi, xxxhdpi 等等 我想知道 Android 是否自己做这个缩放工作

谢谢

最佳答案

阅读 Supporting Multiple Screens

Android runs on a variety of devices that offer different screen sizes and densities. For applications, the Android system provides a consistent development environment across devices and handles most of the work to adjust each application's user interface to the screen on which it is displayed. At the same time, the system provides APIs that allow you to control your application's UI for specific screen sizes and densities, in order to optimize your UI design for different screen configurations. For example, you might want a UI for tablets that's different from the UI for handsets.

因此,为了良好的实践,您应该为不同的屏幕密度创建不同的可绘制对象。

关于android - (Android) 如果我只将图像文件放在 drawable-xxhdpi 文件夹中,它是否适用于具有不同密度的所有设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44940996/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com