CustomView get disappeared when having big dimensions

I created a custom LinearLayout and it's work fine without any problem, But when it's have a big height it's getting disappeared! here is my code:

public class ShadowCard extends LinearLayout {

Paint backgroundPaint = new Paint();
float padding = DimensionUtils.convertDipToPixels(16);
int contactsPadding = DimensionUtils.convertDipToPixels(23);
int width, height;

public ShadowCard(Context context) {
    super(context);
    init();
}

public ShadowCard(Context context, AttributeSet attrs) {
    super(context,attrs);
    init();
}

public ShadowCard(Context context, AttributeSet attrs, int style) {
    super(context,attrs,style);
    init();
}

private void init() {
    setWillNotDraw(false);
    setLayerType(LAYER_TYPE_SOFTWARE, null);
    setPadding(contactsPadding, contactsPadding, contactsPadding, contactsPadding);
    backgroundPaint.setStyle(Paint.Style.FILL);
    backgroundPaint.setAntiAlias(true);
    backgroundPaint.setPathEffect(new CornerPathEffect(DimensionUtils.convertDipToPixels(8)));
    backgroundPaint.setColor(Color.parseColor("#252D47"));
    backgroundPaint.setShadowLayer(DimensionUtils.convertDipToPixels(8), 0, DimensionUtils.convertDipToPixels(8), Color.parseColor("#40000000"));
}

@Override
protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    Path backgroundPath = new Path();
    width = getWidth();
    height = getHeight();
    backgroundPath.moveTo(padding, padding);
    backgroundPath.lineTo(width - padding, padding);
    backgroundPath.lineTo(width - padding, height - padding);
    backgroundPath.lineTo(padding, height - padding);
    backgroundPath.close();
    canvas.drawPath(backgroundPath, backgroundPaint);
}

}

It's driving me crazy a bit i still don't get it why it's getting disappeared...

I created this layout to add TextView and some Views to it but when my TextView have a long text my layout getting disappeared.