Code example for LinearLayout

Methods: setOrientationaddView

	protected Context m;
	protected abstract void onInit(boolean inXML);
	private void init(Context context, AttributeSet attrs, int defStyle){
		m = context;
		if (getChildCount() == 0){
			LinearLayout l = new LinearLayout(m);
			super.addView(l, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
	public ViewGroup getViewGroup(){
		return (ViewGroup) getChildAt(0);
	 * addView to LinearLayout(Vertical) 
	 * width: dp 
	 * height: dp 
Stop searching for code, let great code find you!  Add Codota to your java IDE