gpt4 book ai didi

Android dpi Ice Cream Sandwich 问题

转载 作者:太空狗 更新时间:2023-10-29 16:18:06 25 4
gpt4 key购买 nike

我有两个值文件夹:

  • 值(value)观
  • 值-sw320dp

我在带有 Ice Cream Sandwich 的设备上运行该应用程序。

尽管设备具有 240 dpi 显示屏,但它从 values-sw320dp 文件夹而不是 values 文件夹中读取值。

 <?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Ximpl
All Rights Reserved. This program and the accompanying materials
are owned by Ximpl or its suppliers. The program is protected by international copyright
laws and treaty provisions. Any violation will be prosecuted under applicable laws.

NOTICE: The following is Source Code and is subject to all restrictions on such code as contained in the End User License Agreement accompanying
this product.


-->
<resources>
<dimen name="selectYourCountrySize">14sp</dimen>
</resources>

造成这种行为的原因是什么?

最佳答案

sw 限定符用于根据设备上可用的最小宽度定义值(因此,当处于纵向模式时)。它不是基于设备密度。

The fundamental size of a screen, as indicated by the shortest dimension of the available screen area. Specifically, the device's smallestWidth is the shortest of the screen's available height and width (you may also think of it as the "smallest possible width" for the screen). You can use this qualifier to ensure that, regardless of the screen's current orientation, your application has at least dps of width available for its UI.

Source

关于Android dpi Ice Cream Sandwich 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21996343/

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