florent37 / ShapeOfView

Give a custom shape to any android view, Material Design 2 ready
Apache License 2.0
3.12k stars 400 forks source link

Elevation issue #23

Open rahuldas790 opened 5 years ago

rahuldas790 commented 5 years ago

I tried this path and elevation is gone.

`shapeOfView.setClipPathCreator { width, height -> val path = Path()

        path.moveTo(0f, 0f)
        path.lineTo(width.toFloat(), 0f)
        path.lineTo((width - 0.1f * width), 0.5f*height)
        path.lineTo(width.toFloat(), height.toFloat())
        path.lineTo(0f, height.toFloat())
        path.close()

        path
    }`