본문 바로가기 메뉴 바로가기

IT GOGO

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

IT GOGO

검색하기 폼
  • Category (387)
    • Free Board (1)
    • Life (70)
      • IT (16)
      • NEWS (20)
      • Snowboard & Ski (8)
      • Camping & Climbing (3)
      • Camera (1)
      • Food & Cafe (6)
      • Investment (4)
      • Etc.. (12)
    • Computer (290)
      • Algorithms (9)
      • C (17)
      • JAVA (30)
      • Android (105)
      • HTML,PHP,Javascript (5)
      • Linux/Unix (14)
      • Tizen (3)
      • MFC (15)
      • Cocos2d-x (5)
      • Win32 API (3)
      • VBS (Visual Basic Sc.. (7)
      • OS (Windows, Linux, .. (38)
      • Python (3)
      • Tool (25)
      • Etc (10)
      • Google (Adsense,AdMo.. (1)
    • Project (21)
      • Remote (19)
      • Alarm & Weather (2)
  • 방명록

SP (1)
[Android] code내에서 동적으로 setTextSize

android TextView setTextSize 할 때, default 설정은 sp 이며px로 입력하려면 아래와 같이 설정한다. 9sp setTextSize(TypedValue.COMPLEX_UNIT_SP, 9); setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.typo14));textview_msg.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20); 출처:http://stackoverflow.com/questions/6784353/inconsistency-when-setting-textview-font-size-in-code-and-in-resources

Computer/Android 2016. 3. 25. 00:56
이전 1 다음
이전 다음

파트너스 활동을 통해 일정액의 수수료를 제공받을 수 있음



Total
Today
Yesterday
TAG
  • C언어
  • DTS
  • 디바이스트리
  • Linux
  • device tree
  • 안드로이드
  • Android
  • Java
  • 리눅스
  • VBS
more
최근에 달린 댓글


Blog is powered by Tistory / Designed by Tistory

티스토리툴바