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

devbible

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

devbible

검색하기 폼
  • 전체보기 (356)
    • Tips (44)
    • News (32)
    • Event (10)
    • Travel (0)
    • Review (2)
    • Development (266)
    • etc (1)
  • 방명록

getString (1)
[Android] string.xml 에서 String 받기

string.xml 에 등록한 String 은 R.string.mystring 을 하게 되면 id가 구해지고 getString(R.string.mystring) 을 하게 되면 그 안에 있는 String 값을 구 할 수가 있다. 하지만 해당 소스에 Activity 가 상속 되어있지 않을경우나 Activity가 아닐경우 getString() 을 쓸 수가 없다... 아무튼 예를들어 LinearLayout만 상속 했다던지 뭐 그런경우다. LinearLayout 등 Layout 을 상속한 곳에서는 this.getResources().getString(R.string.mystring) 하면되고 BaseAdapter 등 Adapter 종류를 상속한 곳에서는 Adapter 인자인 context에다가 context.ge..

Development 2010. 7. 14. 15:47
이전 1 다음
이전 다음
최근에 올라온 글
글 보관함
Total
Today
Yesterday
TAG
  • MSSQL
  • redis
  • dotnet
  • VisualStudio
  • SharedPreferences
  • Visual Studio 2015
  • Java
  • MySQL
  • Shell
  • Spring
  • 게임
  • JavaScript
  • 이벤트
  • android
  • CentOS
  • Collections
  • Eclipse
  • vcomp140.dll
  • KitKat
  • vcamp140.dll
  • 쿠폰
  • 티스토리 초대장
  • ListView
  • WSL
  • dpi
  • svn
  • ubuntu
  • Linux
  • vcruntime140.dll
  • 게임쿠폰
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바