I am developing an android application. My designer gave me designs with font size 48PT in photoshop. For android how many DPs should I set in font size?
I am developing an android application. My designer gave me designs with font size 48PT in photoshop. For android how many DPs should I set in font size?
2
Answers
Create dimen.xml for your solution.
Directory will be as follow
1. res -> values-ldpi –> dimen.xml
2. res -> values-mdpi –> dimen.xml
3. res -> values-hdpi –> dimen.xml
4. res -> values-xhdpi –> dimen.xml
5. res -> values-xxhdpi –> dimen.xml
in that file create
Size will be different for all devices set that according to your layout and requirements.
Now Give Your Textview size with
android:textsize="@dimen/text_size"
http://angrytools.com/android/pixelcalc/
This site helps you to convert your values px,dp,sp,pt,etc..
make sure you are using the right Density in the drop down.
Your 48dp equals 107sp and 106dp