Listing 1115 reslayoutmainxml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"

android:gravity="center" >

<ImageView android:id="@+id/myanimated"




<Button android:id="@+id/startAnimated" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="you've got mail" />


Figure 11.4 Based layout for the animation.

To animate this view, an animation set needs to be defined. In Eclipse, right-click the res/ folder and select New ^ Android XML File.Then, fill the filename as animated.xml and select the file-type as Animation. Then, the file can be edited to create the content shown in Listing 11.16.

Was this article helpful?

0 0
Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook

Post a comment