Code example for Scroller

0
	 */ 
	private boolean mIsLayoutDirty = true;
 
	public SimpleScrollView(Context context) {
		super(context);
		mScroller = new Scroller(context);
	} 
 
	@Override 
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
 
		final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
		if (widthMode == MeasureSpec.UNSPECIFIED) {
			return; 
		} 
 
		if (getChildCount() > 0) {
			final View child = getChildAt(0);
			int width = getMeasuredWidth();
Contextual code suggestions in your IDE  Get Codota for Java