Code example for View

Methods: getLeftoffsetLeftAndRight

0
    @Override 
    protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
        canvas.save();
 
        if(child == mTitleBar) {
            mTitleBar.offsetLeftAndRight(getScrollX() - mTitleBar.getLeft());
 
            if(Build.VERSION.SDK_INT < 16) {
                mMatrix.set(canvas.getMatrix());
                mMatrix.postTranslate(0, -getScrollY());
                canvas.setMatrix(mMatrix);
            } 
        } 
 
        boolean result = super.drawChild(canvas, child, drawingTime);
        canvas.restore();
 
        return result;
    } 
 
Connect your IDE to all the code out there  Get Codota for Java