code clean

This commit is contained in:
Hemanth S 2020-12-05 19:02:49 +05:30
parent 6845f75ea0
commit 1b08b775ac
10 changed files with 37 additions and 48 deletions

View file

@ -48,15 +48,4 @@ fun Drawable.getBitmapDrawable(): Bitmap {
val canvas = Canvas(bmp)
draw(canvas)
return bmp
}
fun getAdaptiveIconDrawable(context: Context): Drawable {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
AdaptiveIconDrawable(
ContextCompat.getDrawable(context, R.drawable.ic_launcher_background),
ContextCompat.getDrawable(context, R.drawable.ic_launcher_background)
)
} else {
ContextCompat.getDrawable(context, R.drawable.color_circle_gradient)!!
}
}
}