TextView.setTextSize()
프로그래밍/Android 2011/01/12 23:48 |
android.widget.TextView 에서 setTextSize() method 를 보면,
파라미터가 scaled pixel 이라고 되어 있다.
조심해서 쓰자 -_-;
단위까지 표현하고 싶다면 파라미터 2개짜리 method 를 사용하면 된다.
파라미터가 scaled pixel 이라고 되어 있다.
조심해서 쓰자 -_-;
단위까지 표현하고 싶다면 파라미터 2개짜리 method 를 사용하면 된다.
public void setTextSize (float size)
Since: API Level 1
Set the default text size to the given value, interpreted as "scaled pixel" units. This size is adjusted based on the current density and user font size preference.
Related XML Attributes
Parameters
| size | The scaled pixel size. |
|---|
public void setTextSize (int unit, float size)
Since: API Level 1
Set the default text size to a given unit and value. See TypedValue for the possible dimension units.
Related XML Attributes
Parameters
| unit | The desired dimension unit. |
|---|---|
| size | The desired size in the given units. |
댓글을 달아 주세요
비밀댓글입니다
요즘 교수님과 같이 안드로이드 수업하는데 수업자료 만드느라 죽겠삼. ㅠㅠ
재미 있겠어요. 저도 좀 가르쳐 주세요 ㅠ