1. setText
setTextSize(TypedValue.COMPLEX_UNIT_PX,22); //22px(像素)
setTextSize(TypedValue.COMPLEX_UNIT_SP,22); //22SP
setTextSize(TypedValue.COMPLEX_UNIT_DIP,22);//22DIP
如果22为22sp,则改
<dimen name="handle_edit_text_size">28sp</dimen> setTextSize(TypedValue.COMPLEX_UNIT_PX,getResources().getDimension(R.dimen.handle_edit_text_size) );
原因:http://blog.csdn.net/philofly/article/details/8652439