Code example for ImageSwitcher

Methods: setImageDrawable

0
		inAnim=AnimationUtils.loadAnimation(this, R.animator.push_up_in);
		 
		inAnim.setAnimationListener(new AnimationListener() {
			@Override 
			public void onAnimationEnd(Animation animation) {
				is.setImageDrawable(null);
			} 
 
			@Override	public void onAnimationRepeat(Animation animation) { }
 
			@Override public void onAnimationStart(Animation animation) {}			
		}); 
        is.setInAnimation(inAnim);
//		is.setInAnimation(null); 
//        is.setOutAnimation(AnimationUtils.loadAnimation(this, R.animator.push_up_out));	 
        is.setImageResource(R.drawable.all_blue);
	} 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.