androidandroid-resourcesandroid-resource-qualifiers

Different integer resource values for phone and tablet?


As described here: https://developer.android.com/guide/topics/resources/more-resources#Integer

I added a resource value for integer at /res/values/integers.xml

Now, I would like to add the same integers.xml for tablet devices? Like it is done for dimension resource files:

enter image description here

Is that possible?


Solution

  • Yes it's possible. Use resource qualifiers on the values like you do with your dimens, for example res/values/integers.xml, res/values-land/integers.xml and so on. That is easier to see when you view your project as a file tree rather than the Android project view you have in your screenshot.