안드로이드에는 아래와 같은 Resource type이 있습니다.

미리 resource를 xml파일이나 이미지로 만들어, 
각 resource에 맞는 폴더(res/xxx...)에 저장해두고 접근(R.xxx... )해서 사용할 수 있습니다.


Animation Resources
Define pre-determined animations. 
Color State List Resource
Define a color resources that changes based on the View state.
Drawable Resources
Define various graphics with bitmaps or XML.
Layout Resource
Define the layout for your application UI.
Menu Resource
Define the contents of your application menus.
String Resources
Define strings, string arrays, and plurals (and include string formatting and styling).
Style Resource
Define the look and format for UI elements.

More Resource Types
Define values such as booleans, integers, dimensions, colors, and other arrays.



아래의 표는 Resource type과 해당 type이 어떤 resource인지,
어디에 저장되는지, 사용할때 access는 어떻게 하는지를 보여줍니다.

Resource Types

Define

Saved folder

Access

Animation Resources

Tween Animations

res/anim

R.anim

Frame Animations

res/drawable

R.drawable

Color State List Resource

Color resource

res/color

R.color

Drawable Resources

Graphics..

(bitmaps or XML)

res/drawable

R.drawable

Layout Resource

Layout for application UI

res/layout

R.layout

Menu Resource

Contents of application menus

res/menu

R.menu

String Resources

Strings,

String arrays,

Plurals

res/values

R.string

R.array

R.plurals

Style Resource

UI elements

res/values

 

More Resource Types

Booleans,

Integers,

Dimensions,

Colors,

And other arrays0

res/values

R.bool

R.integer

R.diment,

Etc..



Posted by croute

댓글을 달아 주세요