Listing 1117 srccomcookbookadvancemyanimationjava

package com.cookbook.advance;

import; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.ImageView;

public class myanimation extends Activity {

/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedlnstanceState) { super.onCreate(savedlnstanceState); setContentView(R.layout.main);

final ImageView im

= (ImageView) this.findViewById(; final Animation an

= AnimationUtils.loadAnimation(this, R.anim.animated);


Button bt = (Button) this.findViewByld(; bt.setOnClickListener(new OnClickListener(){ public void onClick(View view){

im.setVisibility(View.VISIBLE); im.startAnimation(an);

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