Skip to content

Instantly share code, notes, and snippets.

View soroushLotfi's full-sized avatar

Soroush Lotfi soroushLotfi

View GitHub Profile
@soroushLotfi
soroushLotfi / BackgroundDrawable.kt
Created January 6, 2022 21:19
A background drawbale with rounded corners and shadow effect around it
import android.graphics.*
import android.graphics.drawable.Drawable
class BackgroundDrawable : Drawable() {
private val shadowSize = 3f.dp
private val rectRadius = 5f.dp
private val rect = RectF()