Code example for HorizontalScrollView

Methods: addView

0
	/** 
	 * All that the user include is added in the scroll 
	 */ 
	@Override 
	public void addView(View child) {
		mScroll.addView(child);
	} 
 
	/** 
	 * Controls if the top bar should appear or not 
	 */ 
	@Override 
	protected void onSizeChanged(int arg0, int arg1, int arg2, int arg3) {
		super.onSizeChanged(arg0, arg1, arg2, arg3);
		View chield = mScroll.getChildAt(0);
		if (chield != null) {
			if (chield.getMeasuredWidth() > getWidth()) {
				mBar.setVisibility(LinearLayout.VISIBLE);
			} else { 
				mBar.setVisibility(LinearLayout.INVISIBLE);
			}