我有兩個值的文件夾:DPI的Android Ice Cream Sandwich的問題
- 值
- 價值觀sw320dp
我跑了Ice Cream Sandwich的設備上的應用程序。
儘管設備具有240 dpi顯示屏,但它將從值中讀取值 - sw320dp文件夾,而不是值文件夾。
<?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-320dp? – user3278732
如果您想根據顯示密度使用不同的值,則需要使用dpi限定符插入不同的文件夾。 例如:values-ldpi,values-mdpi,values-hdpi,values-xhdpi – simoneL