2010-01-26 89 views

回答

7

这将在上下文中返回像素值:

float size = new TextView(this).getTextSize(); 
+0

这是我做什么,但我不知道是否有任何其他方式没有创建一个新的TextView? – yuku 2010-01-26 09:27:10

1
TextView txt = (TextView) findById(R.id.text); 
float size = txt.getTextSize(); 

这应该做它在现有的