Code example for RelativeLayout

Methods: setVisibility, startAnimation

0
					// anim.setRepeatMode(Animation.REVERSE); 
				} 
				Log.d("battbar", "start anim");
				anim.setRepeatCount(Animation.INFINITE);
 
				chargeholder.setVisibility(View.VISIBLE);
				chargeholder.startAnimation(anim);
			} 
		} 
	} 
 
	@Override 
	public void stop() { 
		mRunning = false;
		// stop the animation. 
		chargeholder.clearAnimation();
		Log.d("battbar", "stop anim");
		// hide the layout in-case it is a bad size after stopping. 
		chargeholder.setVisibility(View.GONE);
	}