Reputation: 437
Is it bad practice to use multiple dimens.xml
files with different sw<>dp
, in order to store different dp
amounts for scaling sprites on different devices. Should I do this a different way.
Upvotes: 1
Views: 101
Reputation: 1242
It is the recommended thing to do. You can customize dimensions originally defined in res/values/dimens.xml
(such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape in the res/values-sw720dp-land
for instance.
Upvotes: 2
Reputation: 10052
Sounds like a good idea. This is from one of my projects:
as you can see I have 2 dimens.xml
files one in res/values/
folder and the second one in res/values-w820dp/
folder.
Upvotes: 1