开发者

Can you use a formula in the value of an XML attribute on Android?

I have the following in my /res/values/dimens.xml :

<dimen name="page_pad">5dip</dimen>
<dimen name="page_pad_double">10dip</dimen>

Does anyone know if it's possible to achieve something like this instead:

<dimen name="page_pad">5dip</dimen>
<dimen name="page_pad_double">@dimen/page_pad * 2</dimen>

I do not have access to开发者_如何学编程 the java files, need to accomplish this in XML only. Any ideas?


No, it is not possible to accomplish that. You can only specify a constant value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜