안드로이드에는 아래와 같은 Resource type이 있습니다.
미리 resource를 xml파일이나 이미지로 만들어,
각 resource에 맞는 폴더(res/xxx...)에 저장해두고 접근(R.xxx... )해서 사용할 수 있습니다.
아래의 표는 Resource type과 해당 type이 어떤 resource인지,
어디에 저장되는지, 사용할때 access는 어떻게 하는지를 보여줍니다.
Resource Types |
Define |
Saved folder |
Access |
Tween Animations |
res/anim |
R.anim |
|
Frame Animations |
res/drawable |
R.drawable |
|
Color resource |
res/color |
R.color |
|
Graphics.. (bitmaps or XML) |
res/drawable |
R.drawable |
|
Layout for application UI |
res/layout |
R.layout |
|
Contents of application menus |
res/menu |
R.menu |
|
Strings, String arrays, Plurals |
res/values |
R.string R.array R.plurals |
|
UI elements |
res/values |
|
|
Booleans, Integers, Dimensions, Colors, And other arrays0 |
res/values |
R.bool R.integer R.diment, Etc.. |
'Android > Resource' 카테고리의 다른 글
[Android] Drawable from Resource(리소스파일로 Drawable 객체 만들기) (1) | 2011.04.27 |
---|---|
[Android] Image Resource 불러오기 (Drawable Resource) (0) | 2011.04.23 |
[Android] values / values-ko / 언어설정 / R.string (0) | 2011.04.13 |
[Android] Resource types - 안드로이드 리소스 타입 (0) | 2011.02.14 |
[Android] Providing Resource, Resource Identifier - 리소스, 적합한 리소스 제공하기 (0) | 2011.02.11 |
[Android] MediaPlayer / SoundPool / 간단한 미디어 재생 (mp3, ogg, wav 등) (2) | 2011.02.08 |