Android 我在 res 文件夹的 xml 文件中得到了以下代码。
<?xml version="1.0" encoding="utf-8"?>
<designs>
<design name="2Parts">
<module id="0" posY="0" posX="0" height="0.5" width="1" capHeight="0.2"></module>
<module id="1" posY="0.5" posX="0" height="0.66" width="1" capHeight="0.2"></module>
</design>
而不是使用 height="0.5" 我想从字符串中获得一个变量,例如 height="@string/height_one" 。但不知何故我不能使用@string 函数。那可能吗?
有没有一种简单的方法来计算其他文件中的字符串?例如:
height="@string/height_one * 0.5" ?
期待您的回答