Resources


 

  1. PropertyAnimation
  2. TweenAnimation
  3. FrameAnimation
  4. ColorStateList
  5. ShapeDrawable
  6. StateList
  7. ValueResources
  8. QuantityStrings
  9. TypedArrayResources

 

1. PropertyAnimation

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> Create new folder, animator -> Create new xml, rotate.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open AndroidManifest.xml and add following code :

ScreenShot:

propertyanimation

Download SourceCode

 

2. TweenAnimation

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

ScreenShot:

 tweenanimation tweenanimation2

Download SourceCode

 

3. FrameAnimation

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> drawable -> Create new xml, frame_animator.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open AndroidManifest.xml and add following code :

ScreenShot:

frameanimation

Download SourceCode

 

4. ColorStateList

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> Create new folder, color -> Create new xml, color_state_list.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open AndroidManifest.xml and add following code :

ScreenShot:

colorstatelist colorstatelist2

Download SourceCode

 

5. ShapeDrawable

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> drawable -> Create new xml, shape_rectangle.xml and add following code :

Step 4 : Open res -> drawable -> Create new xml, shape_oval.xml and add following code :

Step 5 : Open res -> drawable -> Create new xml, shape_line.xml and add following code :

Step 6 : Open src -> package -> MainActivity.java and add following code :

Step 7 : Open AndroidManifest.xml and add following code :

ScreenShot:

shape_drawable

Download SourceCode

 

6. StateList

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> drawable -> Create new xml, button_selector.xml and add following code :

Step 4 : Open res -> drawable -> Create new xml, button_pressed.xml and add following code :

Step 5 : Open res -> drawable -> Create new xml, button_normal.xml and add following code :

Step 6 : Open src -> package -> MainActivity.java and add following code :

Step 7 : Open AndroidManifest.xml and add following code :

ScreenShot:

statelist statelist2

Download SourceCode

 

7. ValueResources

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> values -> strings.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open AndroidManifest.xml and add following code :

ScreenShot:

 value_resources

Download SourceCode

 

8. QuantityStrings

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> values -> Create new xml, plurals.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open AndroidManifest.xml and add following code :

ScreenShot:

 quantity_string

Download SourceCode

 

9. TypedArrayResources

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> values -> strings.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

ScreenShot:

typedarray

Download SourceCode