Code example for RelativeLayout

Methods: addView, setVisibility

0
	 
	public View createView(Context c) {
		v = new VideoView(c);
		v.setOnCompletionListener(this);
		v.setVideoPath(this.getResource() );
		this.layout = new RelativeLayout(c);
		this.layout.setPadding(getLeft(), getTop(), 0, 0);
		this.layout.addView(this.v, new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT) );
		this.layout.setVisibility(View.GONE);
		return layout;
	} 
	 
	public View getView() {
		return layout;
	} 
	 
	public void onCompletion(MediaPlayer arg0) {
		complete = true;
	} 
}