tags:

views:

178

answers:

1

Looking in the android sdk folders, I've found a file called values/config.xml. This seems to be somewhere that you can define values for later use in layouts and animations.

Given the config.xml:

<resources>
    <string name="config_somePadding">50dip</string>
</resources>

How would I reference this to use as the layout_height in a layout xml file?

@string/config_somePadding is actually the only one I've found that doesn't throw an error in Eclipse (even though there isn't a config_somePadding in values/strings.xml), but it appears to just put an empty string.

In the sdk, they use an integer for animation duration. They reference it like this: android:duration="@android:integer/config_longAnimTime". Is there a way to use values that aren't integers in the layout_height attribute?

+2  A: 

How would I reference this to use as the layout_height in a layout xml file?

You wouldn't. Use a dimension resource instead.

Is there a way to use values that aren't integers in the layout_height attribute?

You have to use a dimension resource for dimensions.

CommonsWare