android 不同尺寸的分辨率的手机设置不同的字体大小

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

//1.create different dimens.xml in different resource folders as below 

 res/values-ldpi/dimens.xml
 res/values-mdpi/dimens.xml
 res/values-hdpi/dimens.xml

 //Then Android will decide which file to use. 

//2.Create  dimensions values in respective dimens.xml file according to the need as below


 
 25dip

// and..

 
 20dip

// etc. 
// 3.Don't care about resolution Android will take care of which resource to fetch.
// 4.Mention size in  dp instead of pixels.

转载于:https://my.oschina.net/u/1177694/blog/1503699

你可能感兴趣的:(android 不同尺寸的分辨率的手机设置不同的字体大小)