I'm trying to decrease the text size of a textview depending on the device the app runs. However I can't make it work.
I created the folder values-sw320dp (also tried values-w320dp) and put inside the dimens.xml file
<resources>
<dimen name="text_size">25sp</dimen>
</resources>
and my values/dimens.xml file contains
<dimen name="text_size">18sp</dimen>
What I expect is to load the app in Nexus One (emulator), which is 482 x 320 dp, and get the text size 18sp. However I get text size 25sp.
Does anyone know what is happening?
Thank you
Create folder as
values-hdpi
dimens.xml for values-hdpi
And Create folder as
values-xhdpi
dimens.xml for values-xhdpi
And use like this-