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.
精彩评论