判断当前系统使用字体的大小级别

/**
* 获取系统字体大小
*
* @return 1:正常 ;1.5:超大
*/
public static float getFontSize() {
Configuration mCurConfig = new Configuration();
try {
mCurConfig.updateFrom(ActivityManagerNative.getDefault().getConfiguration());
} catch (RemoteException e) {
Log.w(TAG, "Unable to retrieve font size");
}

Log.w(TAG, "getFontSize(), Font size is " + mCurConfig.fontScale);
return mCurConfig.fontScale;

}

posted @ 2013-07-18 10:38  马骝  阅读(452)  评论(0编辑  收藏  举报