Resource in Android OS?

##A resource is a localized text string, bitmap or other small piece of non code information that our program needs.
## At built time all our resources get compiled into our application.

##This is useful for internationalization and for supporting multiple device types.
##We will create and store our resources in “res” directory inside our project.

##The android resource compiler processes resources according to which subfolder they are in and the format of the file.
Example:-PNG , JPG format bitmap etc.

    Types of resource
(1)Animation Resource:-
(
i) Define pre- determined animations.
(ii)Tween animations are saved in res/anim/ and accessed from the R.anim class.
(iii)Frame animation are saved in res/
drawable/ and accessed from the R.dawable class.

(2)Color Resource:-
(
i) Define a color resource that changes based on the view state.
(ii)saved in res/color/ and accessed from the
R.color class.

(3)Drawable Resource:-
(
i) Define various graphics with bitmap or XML.
(ii)saved in res/drawable/ and accessed from the
R.drawable class.

(4)Layout Resource:-
(
i) Define the layout for our application UI.
(ii)saved in res/layout/ and accessed from the
R.layout class.

(5)Menu Resource:-
(
i) Define the content of your application menus.
(ii)saved in res/menu/ and accessed from the
R.menu class.

(6)String Resource:-
(
i) Define strings, string arrays and plurals.
(ii)saved in res/values/ and accessed from the
R.string, R.array, and R. plural classes.

(7)Style Resource:-
(
i) Define the look and format for UI elements.
(ii)saved in res/values/ and accessed from the
R.style class.

(8)More resource types:-
(
i) Define the values such as booleans, intergers, dimensions, colours and other arrays.
(ii)saved in res/values/ and accessed from unique R-sub classes(such as
R.bool, R.integer, R.dimen
etc.)

Comments