Code example for RotateAnimation

Methods: setAnimationListener, setDuration

0
				@Override 
				public void onClick(View arg0) 
				{ 
					//Log.d(null, (String) ((TextView)rowView.findViewById(R.id.news_tv)).getText()); 
					//Animation anim = AnimationUtils.loadAnimation(rowView.getContext(), R.anim.arrow_rotate_anim); 
					RotateAnimation anim = new RotateAnimation(0, 360, 0,(float)arrowsImg.getWidth()/2.0f, 0, (float)arrowsImg.getHeight()/2.0f);
					anim.setDuration(500);
					anim.setAnimationListener(new AnimationListener()
					{ 
 
						@Override 
						public void onAnimationEnd(Animation arg0) {
							rescanButton.setEnabled(false);
							arrowsImg.setVisibility(View.GONE);
							newsContent.setScannable(false);
							 
							Intent intent = new Intent(context,GamesActivity.class);
							context.startActivity(intent);
							 
						}